Description of problem: I just tried to compile package quagga-0.98.0-2 from Redhat Fedora development tree. The compiler said 1. ospf6_asbr.c(456): warning #175: subscript out of range The source code is zlog_debug ("Redistribute %s (%s)", pbuf, ZROUTE_NAME (type)); but #define ZROUTE_NAME(x) \ (0 < (x) && (x) < ZEBRA_ROUTE_MAX ? zroute_name[(x)] : \ zroute_name[ZEBRA_ROUTE_MAX]) and const char *zroute_name[] = { "system", "kernel", "connected", "static", "rip", "ripng", "ospf", "ospf6", "isis", "bgp", "unknown" }; and ../BUILD/quagga-0.98.0/lib/zebra.h:#define ZEBRA_ROUTE_MAX 11 Suggest avoid access zroute_name[ 11], since it does not exist. 2. ospf6_asbr.c(759): warning #175: subscript out of range ospf6_asbr.c(762): warning #175: subscript out of range ospf6_asbr.c(798): warning #175: subscript out of range ospf6_asbr.c(803): warning #175: subscript out of range ospf6_asbr.c(1208): warning #175: subscript out of range Duplicates. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
These paticular warnings are gone from 0.98.5, although plenty of others remain.
>These paticular warnings are gone from 0.98.5 Sure ? Those warning messages are from the Intel compiler. Are you telling us you tried the Intel compiler or are you telling us that you visually inspected the code and it won't make those warnings anymore ? GNU C [ in any released version ] doesn't warn about array index out of range.