diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2024-05-13 13:52:17 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2024-05-13 13:52:17 -0400 |
commit | 1f7452fa598ee5f1ed32f1fcce101c63c6f1933f (patch) | |
tree | 4b2ebce1efee290921469ae810d60d6a27577f81 | |
parent | 11c1984cccad1d41f461d3bb00f9e662332d002b (diff) | |
download | postgresql-1f7452fa598ee5f1ed32f1fcce101c63c6f1933f.tar.gz postgresql-1f7452fa598ee5f1ed32f1fcce101c63c6f1933f.zip |
Remove COMMAND_TAG_NEXTTAG from enum CommandTag.
COMMAND_TAG_NEXTTAG isn't really a valid command tag. Declaring it
as if it were one prompts complaints from Coverity and perhaps other
static analyzers. Our only use of it is in an entirely-unnecessary
array sizing declaration, so let's just drop it.
Ranier Vilela
Discussion: https://postgr.es/m/CAEudQAoY0xrKuTAX7W10zsjjUpKBPFRtdCyScb3Z0FB2v6HNmQ@mail.gmail.com
-rw-r--r-- | src/backend/tcop/cmdtag.c | 2 | ||||
-rw-r--r-- | src/include/tcop/cmdtag.h | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/tcop/cmdtag.c b/src/backend/tcop/cmdtag.c index 68689b3e0d9..0870064fdd8 100644 --- a/src/backend/tcop/cmdtag.c +++ b/src/backend/tcop/cmdtag.c @@ -30,7 +30,7 @@ typedef struct CommandTagBehavior #define PG_CMDTAG(tag, name, evtrgok, rwrok, rowcnt) \ { name, (uint8) (sizeof(name) - 1), evtrgok, rwrok, rowcnt }, -static const CommandTagBehavior tag_behavior[COMMAND_TAG_NEXTTAG] = { +static const CommandTagBehavior tag_behavior[] = { #include "tcop/cmdtaglist.h" }; diff --git a/src/include/tcop/cmdtag.h b/src/include/tcop/cmdtag.h index da210e54fa8..23c99d7eca6 100644 --- a/src/include/tcop/cmdtag.h +++ b/src/include/tcop/cmdtag.h @@ -22,7 +22,6 @@ typedef enum CommandTag { #include "tcop/cmdtaglist.h" - COMMAND_TAG_NEXTTAG } CommandTag; #undef PG_CMDTAG |