From 15e66cdeb1ca2feec28c02f54759dbbd340f98f0 Mon Sep 17 00:00:00 2001 From: Daria Lepikhova Date: Mon, 12 Oct 2020 09:58:55 +0500 Subject: [PATCH] Added /*fall through*/ comments for fix warnings --- jsquery_extract.c | 1 + jsquery_io.c | 2 ++ jsquery_support.c | 10 +++++++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/jsquery_extract.c b/jsquery_extract.c index 1b61267..20da440 100644 --- a/jsquery_extract.c +++ b/jsquery_extract.c @@ -178,6 +178,7 @@ recursiveExtract(JsQueryItem *jsq, bool not, bool indirect, PathItem *path) *result->exactValue = e; return result; } + /* fall through */ /* jqiEqual with jqiArray follows */ case jqiIn: case jqiOverlap: diff --git a/jsquery_io.c b/jsquery_io.c index 2e4c328..ff05cec 100644 --- a/jsquery_io.c +++ b/jsquery_io.c @@ -44,6 +44,7 @@ flattenJsQueryParseItem(StringInfo buf, JsQueryParseItem *item, bool onlyCurrent case jqiKey: if (onlyCurrentInPath) elog(ERROR,"Array length should be last in path"); + /* fall through */ case jqiString: appendBinaryStringInfo(buf, (char*)&item->string.len, sizeof(item->string.len)); appendBinaryStringInfo(buf, item->string.val, item->string.len); @@ -239,6 +240,7 @@ printJsQueryItem(StringInfo buf, JsQueryItem *v, bool inKey, bool printBracketes case jqiKey: if (inKey) appendStringInfoChar(buf, '.'); + /* fall through */ /* follow next */ case jqiString: escape_json(buf, jsqGetString(v, NULL)); diff --git a/jsquery_support.c b/jsquery_support.c index 278e561..196956a 100644 --- a/jsquery_support.c +++ b/jsquery_support.c @@ -33,10 +33,13 @@ alignStringInfoInt(StringInfo buf) { case 3: appendStringInfoCharMacro(buf, 0); + /* fall through */ case 2: appendStringInfoCharMacro(buf, 0); + /* fall through */ case 1: appendStringInfoCharMacro(buf, 0); + /* fall through */ default: break; } @@ -60,9 +63,9 @@ jsqInitByBuffer(JsQueryItem *v, char *base, int32 pos) switch(INTALIGN(pos) - pos) { - case 3: pos++; - case 2: pos++; - case 1: pos++; + case 3: pos++; /* fall through */ + case 2: pos++; /* fall through */ + case 1: pos++; /* fall through */ default: break; } @@ -86,6 +89,7 @@ jsqInitByBuffer(JsQueryItem *v, char *base, int32 pos) case jqiKey: case jqiString: read_int32(v->value.datalen, base, pos); + /* fall through */ /* follow next */ case jqiNumeric: case jqiBool: