The turn-on of -Werror was never run fully against powerpc.
there were some powerpc specific issues that turned up.
This commit fixes these issues.
route_match_probability (void *rule, struct prefix *prefix,
route_map_object_t type, void *object)
{
- long r;
+ unsigned long r;
#if _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE >= 500
r = random();
#else
- r = (long) rand();
+ r = (unsigned long) rand();
#endif
switch (*(unsigned *) rule)
vty_out (vty, "4 ");
- vty_out (vty, "%5u %7d %7d %8lu %4d %4ld ",
+ vty_out (vty, "%5u %7d %7d %8" PRIu64 " %4d %4zd ",
peer->as,
peer->open_in + peer->update_in + peer->keepalive_in
+ peer->notify_in + peer->refresh_in
if (isis->debugs & DEBUG_ADJ_PACKETS)
{
zlog_debug ("ISIS-Adj (%s): Rcvd L%d LAN IIH from %s on %s, cirType %s, "
- "cirID %u, length %ld",
+ "cirID %u, length %zd",
circuit->area->area_tag,
level, snpa_print (ssnpa), circuit->interface->name,
circuit_t2string (circuit->is_type),
if (isis->debugs & DEBUG_SNP_PACKETS)
{
- zlog_debug ("ISIS-Snp (%s): Sent L%d CSNP on %s, length %ld",
+ zlog_debug ("ISIS-Snp (%s): Sent L%d CSNP on %s, length %zd",
circuit->area->area_tag, level, circuit->interface->name,
stream_get_endp (circuit->snd_stream));
for (ALL_LIST_ELEMENTS_RO (list, node, lsp))
if (isis->debugs & DEBUG_SNP_PACKETS)
{
- zlog_debug ("ISIS-Snp (%s): Sent L%d PSNP on %s, length %ld",
+ zlog_debug ("ISIS-Snp (%s): Sent L%d PSNP on %s, length %zd",
circuit->area->area_tag, level,
circuit->interface->name,
stream_get_endp (circuit->snd_stream));
/* Multiple Router-LSA instance according to size limit setting */
if ( (oa->router_lsa_size_limit != 0)
- && ((caddr_t) lsdesc + sizeof (struct ospf6_router_lsdesc) -
- /* XXX warning: comparison between signed and unsigned */
- (caddr_t) buffer > oa->router_lsa_size_limit))
+ && ((size_t)((char *)lsdesc - buffer)
+ + sizeof (struct ospf6_router_lsdesc)
+ > oa->router_lsa_size_limit))
{
if ((caddr_t) lsdesc == (caddr_t) router_lsa +
sizeof (struct ospf6_router_lsa))
vty_out (vty, "Flag: %x %s", lsa->flag, VNL);
vty_out (vty, "Lock: %d %s", lsa->lock, VNL);
vty_out (vty, "ReTx Count: %d%s", lsa->retrans_count, VNL);
- vty_out (vty, "Threads: Expire: %llx, Refresh: %llx %s",
- (unsigned long long)lsa->expire, (unsigned long long)lsa->refresh, VNL);
+ vty_out (vty, "Threads: Expire: %p, Refresh: %p %s",
+ lsa->expire, lsa->refresh, VNL);
vty_out (vty, "%s", VNL);
return;
}