]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: Arm build breakage with MAX_INT macro issues
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 3 Aug 2016 14:26:31 +0000 (10:26 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 3 Aug 2016 19:11:44 +0000 (15:11 -0400)
The VTY_GET_INTEGER_RANGE macro is failing on arm
with a warning->error issue where we are passing in
a unsigned MAXINT to this macro and it is complaining
that the comparison of (TMPL) > MAXINT is always going
to be false because of data structure size.

I've changed the tmp variable to a unsigned long long
which alleviates this issue.

Ticket: CM-12187
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
lib/vty.h

index 81251e07bba80a953720a53038e52ba8a8f3385a..599882a382b49f8b38669e7792354d4571da07d2 100644 (file)
--- a/lib/vty.h
+++ b/lib/vty.h
@@ -220,7 +220,7 @@ do {                                                            \
 
 #define VTY_GET_INTEGER_RANGE(NAME,V,STR,MIN,MAX)               \
 do {                                                            \
-  unsigned long tmpl;                                           \
+  unsigned long long tmpl;                                      \
   VTY_GET_INTEGER_RANGE_HEART(NAME,tmpl,STR,MIN,MAX);           \
   (V) = tmpl;                                                   \
 } while (0)