From c0b0275c80752c812df7c52a98a72170d5fc3bcb Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Wed, 29 Dec 2021 23:33:38 +0100 Subject: Removed warnings for MS cl -W2 and clang -pedantic -std=c99. No functional changes. --- examples/books.c | 2 +- examples/box2.c | 2 +- examples/cpque.c | 4 ++-- examples/csmap_insert.c | 2 +- examples/cstr_match.c | 2 +- examples/inits.c | 2 +- examples/list.c | 2 +- examples/list_splice.c | 2 +- examples/mapmap.c | 2 +- examples/new_deq.c | 2 +- examples/new_list.c | 2 +- examples/new_map.c | 2 +- examples/new_queue.c | 2 +- examples/new_sptr.c | 2 +- examples/new_vec.c | 2 +- examples/option_mkdir.c | 2 +- examples/phonebook.c | 2 +- examples/sidebyside.cpp | 2 +- examples/splitstr.c | 2 +- examples/stack.c | 2 +- examples/sview_split.c | 2 +- examples/vikings.c | 2 +- examples/words.c | 2 +- 23 files changed, 24 insertions(+), 24 deletions(-) (limited to 'examples') diff --git a/examples/books.c b/examples/books.c index f9340679..8ddce634 100644 --- a/examples/books.c +++ b/examples/books.c @@ -57,4 +57,4 @@ int main() printf("%s: \"%s\"\n", _.book.str, _.review.str); } } -} \ No newline at end of file +} diff --git a/examples/box2.c b/examples/box2.c index fd76f8eb..d5905877 100644 --- a/examples/box2.c +++ b/examples/box2.c @@ -85,4 +85,4 @@ int main(void) { printf("Unboxed point occupies %zu bytes on the stack\n", sizeof(unboxed_point)); } -} \ No newline at end of file +} diff --git a/examples/cpque.c b/examples/cpque.c index d3ad2d0c..048d9b51 100644 --- a/examples/cpque.c +++ b/examples/cpque.c @@ -37,11 +37,11 @@ int main() print_queue(q); icmp_fn = imin_cmp; - c_apply_arr(v, ipque_push(&q2, v), int, data, n); + c_apply_arr(v, ipque_push(&q2, v), const int, data, n); print_queue(q2); icmp_fn = imix_cmp; - c_apply_arr(v, ipque_push(&q3, v), int, data, n); + c_apply_arr(v, ipque_push(&q3, v), const int, data, n); print_queue(q3); } } diff --git a/examples/csmap_insert.c b/examples/csmap_insert.c index 5f5813a8..2a69a8f7 100644 --- a/examples/csmap_insert.c +++ b/examples/csmap_insert.c @@ -105,4 +105,4 @@ int main() print_ii(m4); puts(""); } -} \ No newline at end of file +} diff --git a/examples/cstr_match.c b/examples/cstr_match.c index dc1423d7..db5b3ecf 100644 --- a/examples/cstr_match.c +++ b/examples/cstr_match.c @@ -12,4 +12,4 @@ int main() printf("ends_with: %d\n", cstr_ends_with(ss, ".jpg")); printf("ends_with: %d\n", cstr_ends_with(ss, ".JPG")); } -} \ No newline at end of file +} diff --git a/examples/inits.c b/examples/inits.c index 4fdc17d5..78eced11 100644 --- a/examples/inits.c +++ b/examples/inits.c @@ -110,4 +110,4 @@ int main(void) printf("(%d %d) ", i.ref->x, i.ref->y); puts(""); } -} \ No newline at end of file +} diff --git a/examples/list.c b/examples/list.c index 84f4e24c..4d177b3b 100644 --- a/examples/list.c +++ b/examples/list.c @@ -53,4 +53,4 @@ int main() { printf(" %g", *i.ref); puts(""); } -} \ No newline at end of file +} diff --git a/examples/list_splice.c b/examples/list_splice.c index 0738e9d3..754ec6fb 100644 --- a/examples/list_splice.c +++ b/examples/list_splice.c @@ -35,4 +35,4 @@ int main () print_ilist("list1:", list1); print_ilist("list2:", list2); } -} \ No newline at end of file +} diff --git a/examples/mapmap.c b/examples/mapmap.c index 61b55493..f0bf31a8 100644 --- a/examples/mapmap.c +++ b/examples/mapmap.c @@ -64,4 +64,4 @@ int main(void) c_auto (Stack, s) printf("found: %zu\n", Stack_size(s = contains(&map, "Serena Bath"))); puts("Done"); } -} \ No newline at end of file +} diff --git a/examples/new_deq.c b/examples/new_deq.c index 57224869..9022c377 100644 --- a/examples/new_deq.c +++ b/examples/new_deq.c @@ -58,4 +58,4 @@ int main() { cdeq_str_emplace_back(&svec, "Hello, friend"); } -} \ No newline at end of file +} diff --git a/examples/new_list.c b/examples/new_list.c index b6718d34..2b6b4636 100644 --- a/examples/new_list.c +++ b/examples/new_list.c @@ -56,4 +56,4 @@ int main() c_auto (clist_str, slst) clist_str_emplace_back(&slst, "Hello, friend"); -} \ No newline at end of file +} diff --git a/examples/new_map.c b/examples/new_map.c index f641a0eb..97fce008 100644 --- a/examples/new_map.c +++ b/examples/new_map.c @@ -68,4 +68,4 @@ int main() c_foreach (i, cset_str, sset) printf(" %s\n", i.ref->str); } -} \ No newline at end of file +} diff --git a/examples/new_queue.c b/examples/new_queue.c index 9219a1b4..718c025f 100644 --- a/examples/new_queue.c +++ b/examples/new_queue.c @@ -41,4 +41,4 @@ int main() { } printf("after: size %zu, capacity %zu\n", cqueue_int_size(Q), cqueue_int_capacity(Q)); } -} \ No newline at end of file +} diff --git a/examples/new_sptr.c b/examples/new_sptr.c index 09bb7137..3a038629 100644 --- a/examples/new_sptr.c +++ b/examples/new_sptr.c @@ -52,4 +52,4 @@ int main(void) { printf(" (%d, uses %ld)", *i.ref->get, *i.ref->use_count); puts(""); } -} \ No newline at end of file +} diff --git a/examples/new_vec.c b/examples/new_vec.c index c5570942..b0382121 100644 --- a/examples/new_vec.c +++ b/examples/new_vec.c @@ -56,4 +56,4 @@ int main() cvec_str svec = cvec_str_init(); cvec_str_emplace_back(&svec, "Hello, friend"); cvec_str_drop(&svec); -} \ No newline at end of file +} diff --git a/examples/option_mkdir.c b/examples/option_mkdir.c index b9f4ddea..3c4b8e12 100644 --- a/examples/option_mkdir.c +++ b/examples/option_mkdir.c @@ -91,4 +91,4 @@ int main(int argc, char* argv[]) args.mode? args.mode:"", args.parent, args.verbose, args.context? args.context:""); -} \ No newline at end of file +} diff --git a/examples/phonebook.c b/examples/phonebook.c index ccc10eaf..eeb1d3b8 100644 --- a/examples/phonebook.c +++ b/examples/phonebook.c @@ -81,4 +81,4 @@ int main(int argc, char **argv) print_phone_book(phone_book); } puts("done"); -} \ No newline at end of file +} diff --git a/examples/sidebyside.cpp b/examples/sidebyside.cpp index 435b37f6..d765fb91 100644 --- a/examples/sidebyside.cpp +++ b/examples/sidebyside.cpp @@ -45,4 +45,4 @@ int main() { printf("%d, %d\n", i.ref->first, i.ref->second); puts(""); } -} \ No newline at end of file +} diff --git a/examples/splitstr.c b/examples/splitstr.c index 75ee3022..81688ec7 100644 --- a/examples/splitstr.c +++ b/examples/splitstr.c @@ -34,4 +34,4 @@ int main() c_autovar (cvec_str v = string_split(c_sv("Split,this,,string,now,"), c_sv(",")), cvec_str_drop(&v)) c_foreach (i, cvec_str, v) printf("[%s]\n", i.ref->str); -} \ No newline at end of file +} diff --git a/examples/stack.c b/examples/stack.c index dac0112e..f392ecd1 100644 --- a/examples/stack.c +++ b/examples/stack.c @@ -27,4 +27,4 @@ int main() { puts(""); printf("top: %d\n", *cstack_i_top(&stack)); } -} \ No newline at end of file +} diff --git a/examples/sview_split.c b/examples/sview_split.c index ed0365ec..bd5c26d5 100644 --- a/examples/sview_split.c +++ b/examples/sview_split.c @@ -16,4 +16,4 @@ int main() y = cstr_from_v(year), m = cstr_from_v(month), d = cstr_from_v(day); printf("%s, %s, %s\n", y.str, m.str, d.str); } -} \ No newline at end of file +} diff --git a/examples/vikings.c b/examples/vikings.c index 5acafb3f..943b1f36 100644 --- a/examples/vikings.c +++ b/examples/vikings.c @@ -66,4 +66,4 @@ int main() printf("%s of %s has %d hp\n", _.viking.name.str, _.viking.country.str, _.hp); } } -} \ No newline at end of file +} diff --git a/examples/words.c b/examples/words.c index 568f9557..852207a9 100644 --- a/examples/words.c +++ b/examples/words.c @@ -65,4 +65,4 @@ int main() { int main() { main1(); } -#endif \ No newline at end of file +#endif -- cgit v1.2.3