cfm: Fix GCC warning.
authorBen Pfaff <blp@nicira.com>
Tue, 30 Nov 2010 01:09:53 +0000 (17:09 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 30 Nov 2010 01:09:53 +0000 (17:09 -0800)
On 32-bit platforms GCC warns:
../lib/cfm.c: In function 'compose_ccm':
../lib/cfm.c:130: warning: integer constant is too large for 'long' type
../lib/cfm.c: In function 'cfm_should_process_flow':
../lib/cfm.c:375: warning: integer constant is too large for 'long' type

This fixes the problem by using the UINT64_C macro from <inttypes.h> to
write a 64-constant.

lib/cfm.c

index 12cf3e9..428b1a7 100644 (file)
--- a/lib/cfm.c
+++ b/lib/cfm.c
@@ -33,7 +33,7 @@
 VLOG_DEFINE_THIS_MODULE(cfm);
 
 #define CCM_OPCODE 1              /* CFM message opcode meaning CCM. */
-#define DEST_ADDR  0x0180C2000030 /* Destination for MD level 0 CCMs. */
+#define DEST_ADDR  UINT64_C(0x0180C2000030) /* MD level 0 CCM destination. */
 
 struct cfm_internal {
     struct cfm cfm;