diff options
| author | Ben Winston | 2024-06-06 22:44:58 -0400 |
|---|---|---|
| committer | Ben Winston | 2024-06-06 22:44:58 -0400 |
| commit | ac40afe547d1cdc1182f487cf03e2a987427f632 (patch) | |
| tree | cf0a22ea89952ad107bc5d086ae4b8cb003de5bb | |
| parent | 5b163ece6dbdad4867902c1d30de644062a2b0ab (diff) | |
add -Wall and -Werror
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | booki.c | 7 |
2 files changed, 2 insertions, 7 deletions
@@ -1,2 +1,2 @@ build: - cc *.c -o booki + cc *.c -Wall -Werror -o booki @@ -482,9 +482,6 @@ const char* get_last_word(const char* str) { } long parse_int(char* current_pos, char** new_pos) { - char c; - char* value; - // strtol can handle leading spaces // will put the first non-digit into endptr char* endptr; @@ -515,8 +512,6 @@ long parse_int(char* current_pos, char** new_pos) { struct es parse_string(char* current_pos, char** new_pos) { // TODO handle failure - - char c; char* value; // leading spaces @@ -570,7 +565,7 @@ struct es parse_strings(char* current_pos, char** new_pos) { *new_pos = current_pos; return head; } else { - printf("error at %x\n", current_pos); + printf("error! +/- 10 context:\n---\n%.21s\n---\n", current_pos - 10); SEEK_UNTIL(current_pos, '\n'); *new_pos = current_pos; return default_es; |
