From 18ef5b458cfaad895612d888f9e145cdb64f7ff0 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Mon, 16 Mar 2020 10:37:47 +1100 Subject: [PATCH] Fix -Wswitch warnings in example/json* --- example/jsonfindptrs/jsonfindptrs.cc | 2 ++ example/jsonptr/jsonptr.cc | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/example/jsonfindptrs/jsonfindptrs.cc b/example/jsonfindptrs/jsonfindptrs.cc index 4e26d0e9..e2ead122 100644 --- a/example/jsonfindptrs/jsonfindptrs.cc +++ b/example/jsonfindptrs/jsonfindptrs.cc @@ -690,6 +690,8 @@ print_json_pointers(JsonThing& jt, std::string s, uint32_t depth) { TRY(print_json_pointers(kv.second, s + e, depth)); } break; + default: + break; } return ""; } diff --git a/example/jsonptr/jsonptr.cc b/example/jsonptr/jsonptr.cc index 11f4201f..dad552d3 100644 --- a/example/jsonptr/jsonptr.cc +++ b/example/jsonptr/jsonptr.cc @@ -888,6 +888,8 @@ handle_token(wuffs_base__token t) { case context::in_dict_after_key: query_matched_fragment = query.matched_fragment(); break; + default: + break; } } if (!query_matched_fragment) { @@ -992,6 +994,8 @@ after_value: case context::in_dict_after_value: ctx = context::in_dict_after_key; break; + default: + break; } return nullptr; }