diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-01-26 18:42:59 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-01-26 18:42:59 +0100 |
commit | a431bae2f1e97a3a711ea55384caa3d40343bad4 (patch) | |
tree | 8515e80a52f206fb29f7ad78d65edd647af5d9e8 /strbuf.c | |
parent | Add vim modeline to trie.inc. (diff) | |
download | calp-a431bae2f1e97a3a711ea55384caa3d40343bad4.tar.gz calp-a431bae2f1e97a3a711ea55384caa3d40343bad4.tar.xz |
Add -Wextra flag, fix resulting warnings.
Diffstat (limited to '')
-rw-r--r-- | strbuf.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -83,7 +83,7 @@ int strbuf_c(strbuf* a, char* b) { return strcmp(a->mem, b) == 0; } -char* charat(strbuf* s, int idx) { +char* charat(strbuf* s, unsigned int idx) { #ifdef SAFE_STR if (idx > s->len) { ERR("Index out of bounds"); @@ -106,7 +106,7 @@ int strbuf_reset(strbuf* s) int strbuf_init_copy(strbuf* dest, strbuf* src) { #ifdef SAFE_STR if (dest->alloc != 0) { - printf("%lu ", dest->alloc); + printf("%u ", dest->alloc); ERR("Dest already allocated"); return 1; } |