X-Git-Url: https://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/3b10bbd3a88d6e16146414d91d06bb2f36347bfc..5b42e9400440d86723a27747b2191ab8cd59c2ee:/src/parse.y diff --git a/src/parse.y b/src/parse.y index d0b56fe..e204c62 100644 --- a/src/parse.y +++ b/src/parse.y @@ -73,17 +73,17 @@ yyerror(char *str) if(strcmp(yytext,"\n")==0) { out=g_strconcat("Error: ",str," before newline",NULL); } else if(yytext[0]=='\0') { - out=g_strconcat("Error: ",str," at end of input",NULL); + out=g_strconcat("Error: ", str, " at end of input", NULL); } else { char *tmp = g_strdup(yytext); - while((p=strchr(tmp,'\n'))) + while((p=strchr(tmp, '\n'))) *p='.'; - out=g_strconcat("Error: ",str," before '",tmp,"'",NULL); + out=g_strconcat("Error: ", str, " before '", tmp, "'", NULL); g_free(tmp); } - fprintf(stderr,"%s:%d: %s\n",filename,line_no,out); + fprintf(stderr, "%s:%d: %s\n", filename, line_no, out); g_free(out); exit(1); @@ -137,7 +137,7 @@ push_function(int scope, int method, char *oid, char *id, char *onerror, strcmp(gtktypes->next->data,"NONE")==0)) { print_error(TRUE, _("The number of GTK arguments and " "function arguments for a signal " - "don't seem to match"),line_no); + "don't seem to match"), line_no); } if(cbuf) { char *p; @@ -336,7 +336,7 @@ destructor: TOKEN TOKEN { if(strcmp($1, "destroywith")==0) { g_free($1); destructor = $2; - destructor_line = ccode_line; + destructor_line = line_no; destructor_simple = TRUE; } else { g_free($1); @@ -455,7 +455,7 @@ argument: ARGUMENT flags argtype TOKEN TOKEN '{' CCODE TOKEN '{' CCODE ';' { } | ARGUMENT flags argtype TOKEN TOKEN { Node *node; - char *get, *set; + char *get, *set = NULL; Variable *var; Type *type; char *root;