aboutsummaryrefslogtreecommitdiff
path: root/strbuf.c
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-01-26 18:42:59 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-01-26 18:42:59 +0100
commita431bae2f1e97a3a711ea55384caa3d40343bad4 (patch)
tree8515e80a52f206fb29f7ad78d65edd647af5d9e8 /strbuf.c
parentAdd vim modeline to trie.inc. (diff)
downloadcalp-a431bae2f1e97a3a711ea55384caa3d40343bad4.tar.gz
calp-a431bae2f1e97a3a711ea55384caa3d40343bad4.tar.xz
Add -Wextra flag, fix resulting warnings.
Diffstat (limited to 'strbuf.c')
-rw-r--r--strbuf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/strbuf.c b/strbuf.c
index 4490ed4a..353b6d84 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -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;
}