JIT flag definitions not parenthesized

Started by David Rowleyover 7 years ago3 messages
#1David Rowley
david.rowley@2ndquadrant.com
1 attachment(s)

Looks like the JIT flags definitions are not properly parenthesized.
It might not matter too much for their current usage, but it might
save a bit of confusion later.

git grep "^#define .*<<.*[^)]$" indicates these are the only offenders.

Patch attached.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachments:

parenthesize_jit_flags.patchapplication/octet-stream; name=parenthesize_jit_flags.patchDownload
diff --git a/src/include/jit/jit.h b/src/include/jit/jit.h
index ddeffae273..b451f4027e 100644
--- a/src/include/jit/jit.h
+++ b/src/include/jit/jit.h
@@ -17,11 +17,11 @@
 
 /* Flags determining what kind of JIT operations to perform */
 #define PGJIT_NONE     0
-#define PGJIT_PERFORM  1 << 0
-#define PGJIT_OPT3     1 << 1
-#define PGJIT_INLINE   1 << 2
-#define PGJIT_EXPR	   1 << 3
-#define PGJIT_DEFORM   1 << 4
+#define PGJIT_PERFORM  (1 << 0)
+#define PGJIT_OPT3     (1 << 1)
+#define PGJIT_INLINE   (1 << 2)
+#define PGJIT_EXPR	   (1 << 3)
+#define PGJIT_DEFORM   (1 << 4)
 
 
 typedef struct JitContext
#2Heikki Linnakangas
hlinnaka@iki.fi
In reply to: David Rowley (#1)
Re: JIT flag definitions not parenthesized

On 22/04/18 23:21, David Rowley wrote:

Looks like the JIT flags definitions are not properly parenthesized.
It might not matter too much for their current usage, but it might
save a bit of confusion later.

git grep "^#define .*<<.*[^)]$" indicates these are the only offenders.

Patch attached.

Fixed, thanks!

- Heikki

#3Andres Freund
andres@anarazel.de
In reply to: Heikki Linnakangas (#2)
Re: JIT flag definitions not parenthesized

Hi,

On 2018-04-23 04:49:17 -0400, Heikki Linnakangas wrote:

On 22/04/18 23:21, David Rowley wrote:

Patch attached.

Fixed, thanks!

Thanks David, Heikki.

- Andres