Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 1f7452f

Browse files
committed
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
1 parent 11c1984 commit 1f7452f

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/backend/tcop/cmdtag.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ typedef struct CommandTagBehavior
3030
#define PG_CMDTAG(tag, name, evtrgok, rwrok, rowcnt) \
3131
{ name, (uint8) (sizeof(name) - 1), evtrgok, rwrok, rowcnt },
3232

33-
static const CommandTagBehavior tag_behavior[COMMAND_TAG_NEXTTAG] = {
33+
static const CommandTagBehavior tag_behavior[] = {
3434
#include "tcop/cmdtaglist.h"
3535
};
3636

src/include/tcop/cmdtag.h

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
typedef enum CommandTag
2323
{
2424
#include "tcop/cmdtaglist.h"
25-
COMMAND_TAG_NEXTTAG
2625
} CommandTag;
2726

2827
#undef PG_CMDTAG

0 commit comments

Comments
 (0)