1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-12-15 14:06:34 +01:00

use char instead of uint8_t, fix compiler warnings so toxic compiles with -Wall and -Werror on gcc and clang

This commit is contained in:
Jfreegman
2014-07-06 22:15:35 -04:00
parent 2ed9448b41
commit a009fbf20c
29 changed files with 369 additions and 368 deletions

View File

@@ -91,7 +91,7 @@ static int parse_command(WINDOW *w, ToxWindow *self, char *cmd, char (*args)[MAX
end = strchr(cmd + 1, '\"');
if (end++ == NULL) { /* Increment past the end quote */
uint8_t *errmsg = "Invalid argument. Did you forget a closing \"?";
char *errmsg = "Invalid argument. Did you forget a closing \"?";
line_info_add(self, NULL, NULL, NULL, errmsg, SYS_MSG, 0, 0);
return -1;
}
@@ -134,7 +134,7 @@ void execute(WINDOW *w, ToxWindow *self, Tox *m, char *cmd, int mode)
if (string_is_empty(cmd))
return;
char args[MAX_NUM_ARGS][MAX_STR_SIZE] = {0};
char args[MAX_NUM_ARGS][MAX_STR_SIZE];
int num_args = parse_command(w, self, cmd, args);
if (num_args == -1)
@@ -158,6 +158,5 @@ void execute(WINDOW *w, ToxWindow *self, Tox *m, char *cmd, int mode)
if (do_command(w, self, m, num_args, GLOBAL_NUM_COMMANDS, global_commands, args) == 0)
return;
uint8_t *errmsg = "Invalid command.";
line_info_add(self, NULL, NULL, NULL, errmsg, SYS_MSG, 0, 0);
line_info_add(self, NULL, NULL, NULL, "Invalid command.", SYS_MSG, 0, 0);
}