From d328d12dd9ba842010e0f30d9d27f4ab9ac55106 Mon Sep 17 00:00:00 2001
From: David Moreau <david.moreau@thalesaleniaspace.com>
Date: Fri, 19 Jul 2013 10:31:56 +0200
Subject: [PATCH 1/5] Add uint64_t cast before bitwise shift (avoid gcc warnings)

---
 c/dadi_snmp.c        |    2 +-
 c/dadi_snmp_tables.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/c/dadi_snmp.c b/c/dadi_snmp.c
index 2e3aab9..898df99 100644
--- a/c/dadi_snmp.c
+++ b/c/dadi_snmp.c
@@ -164,7 +164,7 @@ static int scalar_handler(netsnmp_mib_handler *handler,
 				dadi_evt_value = requests->requestvb->val.integer;
 				break;
 			case DADI_UINT64:
-				u64_value = requests->requestvb->val.counter64->high << 32
+				u64_value = (uint64_t)requests->requestvb->val.counter64->high << 32
 					    | requests->requestvb->val.counter64->low;
 				set_value  = (void *)u64_value;
 				dadi_evt_value = (void *)u64_value;
diff --git a/c/dadi_snmp_tables.c b/c/dadi_snmp_tables.c
index 9964a31..49aeca3 100644
--- a/c/dadi_snmp_tables.c
+++ b/c/dadi_snmp_tables.c
@@ -172,7 +172,7 @@ snmp_dadi_handler(netsnmp_mib_handler *handler,
 				dadi_evt_value = requests->requestvb->val.integer;
 				break;
 			case DADI_UINT64:
-				u64_value = requests->requestvb->val.counter64->high << 32
+				u64_value = (uint64_t)requests->requestvb->val.counter64->high << 32
 					    | requests->requestvb->val.counter64->low;
 				set_value  = (void *)u64_value;
 				dadi_evt_value = (void *)u64_value;
-- 
1.7.1

