common: cast arguments to character classification functions to unsigned char
[babeltrace.git] / src / plugins / ctf / common / metadata / lexer.l
index b88dec879e326ec883814f31dc7e246426badba8..d0695c6b12e6fafc85555fecbc5c2487f9199278 100644 (file)
@@ -32,7 +32,7 @@
 #include <stdio.h>
 #include <ctype.h>
 #include "scanner.h"
-#include "parser.h"
+#include "parser-wrap.h"
 #include "ast.h"
 
 #define YY_FATAL_ERROR(_msg)   BT_LOGF_STR(_msg)
                        return CTF_ERROR;                               \
                }                                                       \
        } while (0)
-
-BT_HIDDEN
-void setstring(struct ctf_scanner *scanner, YYSTYPE *lvalp, const char *src);
-
-static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
-       __attribute__((unused));
-static int input (yyscan_t yyscanner) __attribute__((unused));
-
-BT_HIDDEN
-int import_string(struct ctf_scanner *scanner, YYSTYPE *lvalp, const char *src, char delim);
-
 %}
 
 %x comment_ml comment_sl string_lit char_const
@@ -145,5 +134,5 @@ _Imaginary                  setstring(yyextra, yylval, yytext); return CTF_IMAGINARY;
 
 {IDENTIFIER}                   BT_LOGT("Got identifier: id=\"%s\"", yytext); setstring(yyextra, yylval, yytext); if (is_type(yyextra, yytext)) return ID_TYPE; else return IDENTIFIER;
 [ \t\r\n]                      ; /* ignore */
-.                              _BT_LOGE_LINENO(yylineno, "Invalid character: char=\"%c\", val=0x%02x", isprint(yytext[0]) ? yytext[0] : '\0', yytext[0]); return CTF_ERROR;
+.                              _BT_LOGE_LINENO(yylineno, "Invalid character: char=\"%c\", val=0x%02x", isprint((unsigned char) yytext[0]) ? yytext[0] : '\0', yytext[0]); return CTF_ERROR;
 %%
This page took 0.025253 seconds and 4 git commands to generate.