summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-09-19 13:49:41 +0200
committerTyge Løvset <[email protected]>2021-09-19 13:49:41 +0200
commit8da81e7a625f06ec667793ff624c6876d03abbde (patch)
treef1c09759a45b42fdff374b9bde009a9356dffe29 /examples
parent58b2831a7287cb00d14a221a9d0263fb0c427675 (diff)
downloadSTC-modified-8da81e7a625f06ec667793ff624c6876d03abbde.tar.gz
STC-modified-8da81e7a625f06ec667793ff624c6876d03abbde.zip
Fixed errors caused by gcc -std=c99 -pedantic.
Diffstat (limited to 'examples')
-rw-r--r--examples/advanced.c2
-rw-r--r--examples/csmap_find.c4
-rw-r--r--examples/runall.sh4
3 files changed, 5 insertions, 5 deletions
diff --git a/examples/advanced.c b/examples/advanced.c
index 8044594e..e4d3411e 100644
--- a/examples/advanced.c
+++ b/examples/advanced.c
@@ -19,7 +19,7 @@ typedef struct VikingRaw {
} VikingRaw;
uint64_t vikingraw_hash(const VikingRaw* raw, size_t ignore) {
- uint64_t hash = c_rawstr_hash(&raw->name) ^ (c_rawstr_hash(&raw->country) >> 15);
+ uint64_t hash = c_strhash(raw->name) ^ (c_strhash(raw->country) >> 15);
return hash;
}
static inline int vikingraw_equals(const VikingRaw* rx, const VikingRaw* ry) {
diff --git a/examples/csmap_find.c b/examples/csmap_find.c
index 66768016..30c7a685 100644
--- a/examples/csmap_find.c
+++ b/examples/csmap_find.c
@@ -26,8 +26,8 @@ void print_elem(csmap_istr_rawvalue_t p) {
puts(""); \
}
-using_print_collection(csmap_istr);
-using_print_collection(cvec_istr);
+using_print_collection(csmap_istr)
+using_print_collection(cvec_istr)
void findit(csmap_istr c, csmap_istr_key_t val)
diff --git a/examples/runall.sh b/examples/runall.sh
index c476c6e1..71b1c383 100644
--- a/examples/runall.sh
+++ b/examples/runall.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-cc=gcc
-#cc=clang
+cc='gcc -std=c99 -pedantic'
+#cc='clang'
#cc='clang -c -DSTC_HEADER'
#cc='cl -nologo'
#cc='cl -nologo -TP'