Skip to content

Commit 77d31cf

Browse files
committed
2. trigger.c fails to compile due to a syntax error. It contains
a switch statement that has an empty default label. A label of a switch statement must be followed by a statement (or a label which is followed by a statement (or a label which ...)). 3. Files include stringinfo.h failed to compile. The macro, 'appendStringInfoCharMacro' is implemented with a '?:' operation that returns a void expression for the true part and a char expresion for the false part. Both the true and false parts of the '?:' oper- ator must return the same type. Billy G. Allie
1 parent 2fb0ff0 commit 77d31cf

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/backend/commands/trigger.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.59 2000/02/06 10:19:45 wieck Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.60 2000/02/13 13:21:10 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1201,8 +1201,6 @@ deferredTriggerExecute(DeferredTriggerEvent event, int itemno)
12011201
SaveTriggerData.tg_trigger =
12021202
rel->trigdesc->tg_after_row[TRIGGER_EVENT_DELETE][itemno];
12031203
break;
1204-
1205-
default:
12061204
}
12071205

12081206
/* ----------

src/include/lib/stringinfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
1111
* Portions Copyright (c) 1994, Regents of the University of California
1212
*
13-
* $Id: stringinfo.h,v 1.16 2000/01/26 05:58:09 momjian Exp $
13+
* $Id: stringinfo.h,v 1.17 2000/02/13 13:21:11 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -98,7 +98,7 @@ extern void appendStringInfoChar(StringInfo str, char ch);
9898
#define appendStringInfoCharMacro(str,ch) \
9999
(((str)->len + 1 >= (str)->maxlen) ? \
100100
appendStringInfoChar(str, ch) : \
101-
((str)->data[(str)->len] = (ch), (str)->data[++(str)->len] = '\0'))
101+
(void)((str)->data[(str)->len] = (ch), (str)->data[++(str)->len] = '\0'))
102102

103103
/*------------------------
104104
* appendBinaryStringInfo

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy