From 1cb3d7807ac4f8cd5f12c34775e427e1b33476a5 Mon Sep 17 00:00:00 2001 From: leitner Date: Mon, 25 May 2020 15:06:49 +0000 Subject: [PATCH] silence two more compiler warnings --- scan_asn1generic.c | 4 +++- scan_ldapsearchfilter.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scan_asn1generic.c b/scan_asn1generic.c index cc9974d..bf7c37f 100644 --- a/scan_asn1generic.c +++ b/scan_asn1generic.c @@ -235,7 +235,9 @@ stringmain: if (*fmt=='c') { if (tc!=PRIVATE || tt!=CONSTRUCTED) goto error; - *desttag=tag; + *desttag=tag; // gcc -fanalyzer gives a false positive here. + // if we get here, *fmt was 'c' and we came in via the "case 'c'" + // above which set desttag to something the caller provided. } else { if (tc!=UNIVERSAL || tt!=CONSTRUCTED || tag!=(*fmt=='{'?SEQUENCE_OF:SET_OF)) goto error; diff --git a/scan_ldapsearchfilter.c b/scan_ldapsearchfilter.c index 0f3eb02..db81e7f 100644 --- a/scan_ldapsearchfilter.c +++ b/scan_ldapsearchfilter.c @@ -101,6 +101,7 @@ size_t scan_ldapsearchfilter(const char* src,const char* max,struct Filter** f) res+=len; break; case 9: /* extensibleMatch [9] MatchingRuleAssertion } */ + default: goto error; } return res;