[ovs-dev] [PATCH 1/2] cfm: Fix GCC warning.
Ben Pfaff
blp at nicira.com
Mon Nov 29 17:11:36 PST 2010
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 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/cfm.c b/lib/cfm.c
index 12cf3e9..428b1a7 100644
--- 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;
--
1.7.1
More information about the dev
mailing list