fix some compiler warnings
This commit is contained in:
parent
8f4b9ddaa4
commit
0238ce3c73
|
@ -35,7 +35,7 @@ struct context {
|
|||
char *line_copy;
|
||||
const char *filename;
|
||||
|
||||
const char *compact_error;
|
||||
char *compact_error;
|
||||
|
||||
/* These are the same as in YYLTYPE */
|
||||
int first_column;
|
||||
|
|
|
@ -262,8 +262,8 @@ criteria:
|
|||
{
|
||||
printf("criteria: id = %s\n", $<string>3);
|
||||
/* TODO: correctly parse number */
|
||||
current_match.con_id = atoi($<string>3);
|
||||
printf("id as int = %d\n", current_match.con_id);
|
||||
current_match.con_id = (Con*)atoi($<string>3);
|
||||
printf("id as int = %p\n", current_match.con_id);
|
||||
}
|
||||
| TOK_ID '=' STR
|
||||
{
|
||||
|
@ -360,8 +360,8 @@ focus:
|
|||
printf("should focus\n");
|
||||
if (match_is_empty(¤t_match)) {
|
||||
/* TODO: better error message */
|
||||
LOG("Error: The foucs command requires you to use some criteria.\n");
|
||||
return;
|
||||
LOG("Error: The focus command requires you to use some criteria.\n");
|
||||
break;
|
||||
}
|
||||
|
||||
/* TODO: warning if the match contains more than one entry. does not
|
||||
|
@ -406,7 +406,7 @@ open:
|
|||
{
|
||||
printf("opening new container\n");
|
||||
Con *con = tree_open_con(NULL);
|
||||
asprintf(&json_output, "{\"success\":true, \"id\":%d}", (long int)con);
|
||||
asprintf(&json_output, "{\"success\":true, \"id\":%ld}", (long int)con);
|
||||
}
|
||||
;
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ void tree_append_json(const char *filename) {
|
|||
stat != yajl_status_insufficient_data)
|
||||
{
|
||||
unsigned char * str = yajl_get_error(hand, 1, (const unsigned char*)buf, n);
|
||||
fprintf(stderr, (const char *) str);
|
||||
fprintf(stderr, "%s\n", (const char *) str);
|
||||
yajl_free_error(hand, str);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue