mirror of
https://github.com/sigmasternchen/libargo
synced 2025-03-15 05:08:54 +00:00
fixes some compiler warnings
This commit is contained in:
parent
ae0fda3384
commit
eea92f908e
4 changed files with 6 additions and 4 deletions
|
@ -69,7 +69,7 @@ char* generateMarshallFunction(FILE* output, struct structinfo* info, char* suff
|
|||
fprintf(output, "\t%s* d = (%s*) _d;\n", info->names[0], info->names[0]);
|
||||
fprintf(output, "\tif (d == NULL)\n");
|
||||
fprintf(output, "\t\treturn json_null();\n");
|
||||
fprintf(output, "\treturn json_object(true, %d,\n", info->memberno);
|
||||
fprintf(output, "\treturn json_object(true, %ld,\n", info->memberno);
|
||||
|
||||
for (size_t i = 0; i < info->memberno; i++) {
|
||||
struct memberinfo* member = info->members[i];
|
||||
|
|
|
@ -133,7 +133,7 @@ type: STDINT { yyerror(filename, ERROR("stdint types are not yet supported"));
|
|||
| ID { $$ = newTypeInfo(false, $1); }
|
||||
| type POINTER
|
||||
{
|
||||
if ($1->isPointer || $1->type == "string") {
|
||||
if ($1->isPointer || strcmp($1->type, "string") == 0) {
|
||||
yyerror(filename, ERROR("multiple pointer types are not supported"));
|
||||
YYERROR;
|
||||
} else {
|
||||
|
|
|
@ -22,7 +22,9 @@ const_string "const"{whitespace}*{string}
|
|||
|
||||
%option noyywrap
|
||||
%option nodefault
|
||||
%option yylineno
|
||||
%option nounput
|
||||
%option noinput
|
||||
%option yylineno
|
||||
|
||||
%x COMMENT
|
||||
%%
|
||||
|
|
|
@ -14,7 +14,7 @@ typedef struct {
|
|||
|
||||
bool boolValue;
|
||||
|
||||
const char* stringValue;
|
||||
char* stringValue;
|
||||
char* stringValue2;
|
||||
|
||||
struct_t structValue;
|
||||
|
|
Loading…
Reference in a new issue