summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2009-06-03 14:48:33 +0000
committerBruce Momjian2009-06-03 14:48:33 +0000
commitccc9b0a873e683b48d19f0256b014a17879421c6 (patch)
treef169de2d8976f7d926603e36fc1eb8ec121b387e
parente9c8b6013ee4e5547338f05ad62227f17c402cfe (diff)
Add comment about why "((void) 0)" is used in copy macros.
-rw-r--r--src/backend/commands/copy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index 1460edcf9b..2acdf46d2f 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -175,7 +175,8 @@ typedef struct
/*
* These macros centralize code used to process line_buf and raw_buf buffers.
* They are macros because they often do continue/break control and to avoid
- * function call overhead in tight COPY loops.
+ * function call overhead in tight COPY loops. "((void) 0)" is used to silence
+ * compiler warnings.
*
* We must use "if (1)" because "do {} while(0)" overrides the continue/break
* processing. See http://www.cit.gu.edu.au/~anthony/info/C/C.macros.