commit 12373b0
default
·
2024-10-08 05:45:17 +0000 UTC
parent e49c837
Added -pedantic compilation flag.
4 files changed,
+5,
-4
M
Makefile
+1,
-1
1@@ -1,6 +1,6 @@
2 PREFIX=/usr/local
3 PREFIX_MAN=$(PREFIX)/man
4-CFLAGS?=-g -Wall -Wextra
5+CFLAGS?=-g -Wall -Wextra -pedantic
6
7 all: snac
8
M
xs.h
+1,
-1
1@@ -1070,7 +1070,7 @@ typedef struct {
2 int size; /* size of full dict (_XS_TYPE_SIZE) */
3 int first; /* first node for sequential search */
4 int root; /* root node for hashed search */
5- ditem_hdr ditems[]; /* the ditems */
6+ /* a bunch of ditem_hdr and value follows */
7 } dict_hdr;
8
9
+2,
-1
1@@ -66,7 +66,8 @@ void *xs_rnd_buf(void *buf, int size)
2 /* fill with full integers */
3 while (n--) {
4 xs_rnd_int32_d(&s);
5- p = memcpy(p, &s, sizeof(s)) + sizeof(s);
6+ memcpy(p, &s, sizeof(s));
7+ p += sizeof(s);
8 }
9
10 if ((n = size % sizeof(s))) {
M
xs_url.h
+1,
-1
1@@ -17,7 +17,7 @@ xs_str *xs_url_dec(const char *str)
2
3 while (*str) {
4 if (*str == '%') {
5- int i;
6+ unsigned int i;
7
8 if (sscanf(str + 1, "%02x", &i) == 1) {
9 unsigned char uc = i;