summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2024-10-08 07:45:17 +0200
committerGravatar default2024-10-08 07:45:17 +0200
commit12373b018e985ba0bc5628dcaceb7c406a350e45 (patch)
tree8093b8de6b52fbfb8447eb88d2821d63b719202d
parentDon't cache a page if an error is set. (diff)
downloadpenes-snac2-12373b018e985ba0bc5628dcaceb7c406a350e45.tar.gz
penes-snac2-12373b018e985ba0bc5628dcaceb7c406a350e45.tar.xz
penes-snac2-12373b018e985ba0bc5628dcaceb7c406a350e45.zip
Added -pedantic compilation flag.
-rw-r--r--Makefile2
-rw-r--r--xs.h2
-rw-r--r--xs_random.h3
-rw-r--r--xs_url.h2
4 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 9d1c03d..6cfa070 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
1PREFIX=/usr/local 1PREFIX=/usr/local
2PREFIX_MAN=$(PREFIX)/man 2PREFIX_MAN=$(PREFIX)/man
3CFLAGS?=-g -Wall -Wextra 3CFLAGS?=-g -Wall -Wextra -pedantic
4 4
5all: snac 5all: snac
6 6
diff --git a/xs.h b/xs.h
index e5269a4..39b3b64 100644
--- a/xs.h
+++ b/xs.h
@@ -1070,7 +1070,7 @@ typedef struct {
1070 int size; /* size of full dict (_XS_TYPE_SIZE) */ 1070 int size; /* size of full dict (_XS_TYPE_SIZE) */
1071 int first; /* first node for sequential search */ 1071 int first; /* first node for sequential search */
1072 int root; /* root node for hashed search */ 1072 int root; /* root node for hashed search */
1073 ditem_hdr ditems[]; /* the ditems */ 1073 /* a bunch of ditem_hdr and value follows */
1074} dict_hdr; 1074} dict_hdr;
1075 1075
1076 1076
diff --git a/xs_random.h b/xs_random.h
index d076cc2..78de32a 100644
--- a/xs_random.h
+++ b/xs_random.h
@@ -66,7 +66,8 @@ void *xs_rnd_buf(void *buf, int size)
66 /* fill with full integers */ 66 /* fill with full integers */
67 while (n--) { 67 while (n--) {
68 xs_rnd_int32_d(&s); 68 xs_rnd_int32_d(&s);
69 p = memcpy(p, &s, sizeof(s)) + sizeof(s); 69 memcpy(p, &s, sizeof(s));
70 p += sizeof(s);
70 } 71 }
71 72
72 if ((n = size % sizeof(s))) { 73 if ((n = size % sizeof(s))) {
diff --git a/xs_url.h b/xs_url.h
index d9491ab..1738634 100644
--- a/xs_url.h
+++ b/xs_url.h
@@ -17,7 +17,7 @@ xs_str *xs_url_dec(const char *str)
17 17
18 while (*str) { 18 while (*str) {
19 if (*str == '%') { 19 if (*str == '%') {
20 int i; 20 unsigned int i;
21 21
22 if (sscanf(str + 1, "%02x", &i) == 1) { 22 if (sscanf(str + 1, "%02x", &i) == 1) {
23 unsigned char uc = i; 23 unsigned char uc = i;