Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nanopb/nanopb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pb_decode.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/pb_decode.c b/pb_decode.c
index dc344dc..6223bea 100644
--- a/pb_decode.c
+++ b/pb_decode.c
@@ -351,6 +351,11 @@ static bool checkreturn read_raw_value(pb_istream_t *stream, pb_wire_type_t wire
*size = 4;
return pb_read(stream, buf, 4);
+ case PB_WT_STRING:
+ // Calling read_raw_value with a PB_WT_STRING is an error.
+ // Explicitly handle this case and fallthrough to default to avoid
+ // compiler warnings.
+
default: PB_RETURN_ERROR(stream, "invalid wire_type");
}
}