2. trigger.c fails to compile due to a syntax error. It contains
authorBruce Momjian <bruce@momjian.us>
Sun, 13 Feb 2000 13:21:11 +0000 (13:21 +0000)
committerBruce Momjian <bruce@momjian.us>
Sun, 13 Feb 2000 13:21:11 +0000 (13:21 +0000)
    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

src/backend/commands/trigger.c
src/include/lib/stringinfo.h

index ae0b57457a132097b54034835f8037dbea2da5b5..0b0b3cf2ece8e25a0b74b9d95eb79d5619076c00 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.59 2000/02/06 10:19:45 wieck Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.60 2000/02/13 13:21:10 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1201,8 +1201,6 @@ deferredTriggerExecute(DeferredTriggerEvent event, int itemno)
            SaveTriggerData.tg_trigger   =
                    rel->trigdesc->tg_after_row[TRIGGER_EVENT_DELETE][itemno];
            break;
-
-       default:
    }
 
    /* ----------
index 25b91b9c2dd3b81d578e340378e239717054741a..05ba4b58a1747c64d7d90d7af887b68a7337c2ff 100644 (file)
@@ -10,7 +10,7 @@
  * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: stringinfo.h,v 1.16 2000/01/26 05:58:09 momjian Exp $
+ * $Id: stringinfo.h,v 1.17 2000/02/13 13:21:11 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -98,7 +98,7 @@ extern void appendStringInfoChar(StringInfo str, char ch);
 #define appendStringInfoCharMacro(str,ch) \
    (((str)->len + 1 >= (str)->maxlen) ? \
     appendStringInfoChar(str, ch) : \
-    ((str)->data[(str)->len] = (ch), (str)->data[++(str)->len] = '\0'))
+    (void)((str)->data[(str)->len] = (ch), (str)->data[++(str)->len] = '\0'))
 
 /*------------------------
  * appendBinaryStringInfo