@@ -1,6 +1,6 @@
PREFIX=/usr/local
PREFIX_MAN=$(PREFIX)/man
-CFLAGS?=-g -Wall -Wextra
+CFLAGS?=-g -Wall -Wextra -pedantic
all: snac
@@ -1070,7 +1070,7 @@ typedef struct {
int size; /* size of full dict (_XS_TYPE_SIZE) */
int first; /* first node for sequential search */
int root; /* root node for hashed search */
- ditem_hdr ditems[]; /* the ditems */
+ /* a bunch of ditem_hdr and value follows */
} dict_hdr;
@@ -66,7 +66,8 @@ void *xs_rnd_buf(void *buf, int size)
/* fill with full integers */
while (n--) {
xs_rnd_int32_d(&s);
- p = memcpy(p, &s, sizeof(s)) + sizeof(s);
+ memcpy(p, &s, sizeof(s));
+ p += sizeof(s);
}
if ((n = size % sizeof(s))) {
@@ -17,7 +17,7 @@ xs_str *xs_url_dec(const char *str)
while (*str) {
if (*str == '%') {
- int i;
+ unsigned int i;
if (sscanf(str + 1, "%02x", &i) == 1) {
unsigned char uc = i;