Преглед на файлове

Fix compiler warnings (trunk, https://trac.osgeo.org/grass/changeset/67518 + https://trac.osgeo.org/grass/changeset/67559)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@67560 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler преди 9 години
родител
ревизия
6a7e0834cc
променени са 4 файла, в които са добавени 5 реда и са изтрити 5 реда
  1. 1 1
      include/defs/sqlp.h
  2. 1 1
      lib/db/sqlp/sqlp.l
  3. 1 1
      raster/r.mapcalc/mapcalc.l
  4. 2 2
      raster/r.mapcalc/mapcalc.y

+ 1 - 1
include/defs/sqlp.h

@@ -2,7 +2,7 @@
 #define GRASS_SQLPDEFS_H
 
 int my_yyinput(char *buf, int max_size);
-void yyerror(char *s);
+void yyerror(const char *s);
 int yyparse();
 int yywrap();
 

+ 1 - 1
lib/db/sqlp/sqlp.l

@@ -256,7 +256,7 @@ int my_yyinput(char *buf, int max_size)
  * message and deposits it in a usefull place.
  *
  **********************************************************************/
-void yyerror( char *s )
+void yyerror( const char *s )
 {
 	snprintf( sqlpStmt->errmsg, 500, "%s processing '%s'", s, yytext );
 

+ 1 - 1
raster/r.mapcalc/mapcalc.l

@@ -215,7 +215,7 @@ F		[fF]
 
 
 .		{
-			fprintf(stderr, "syntax error: '%*s'\n", yyleng, yytext);
+			fprintf(stderr, "syntax error: '%*s'\n", (int) yyleng, yytext);
 			yyterminate();
 		}
 %%

+ 2 - 2
raster/r.mapcalc/mapcalc.y

@@ -75,7 +75,7 @@ static expr_list *result;
 extern int yylex(void);
 
 int yyparse(void);
-void yyerror(char *s);
+void yyerror(const char *s);
 
 %}
 
@@ -237,7 +237,7 @@ void syntax_error(const char *fmt, ...)
 	syntax_error_occurred = 1;
 }
 
-void yyerror(char *s)
+void yyerror(const char *s)
 {
 	fprintf(stderr, "%s\n", s);
 	syntax_error_occurred = 0;