Mailing List Archive

Fix another compiler warning
One of my users was complaing that gcc -Wall was producing some
warnings. This patch makes two of them go away.

--- quagga-0.96.3/ospf6d/#ospf6_route.c~ 2003-10-09 16:20:26.000000000 -0400
+++ quagga-0.96.3/ospf6d/ospf6_route.c 2003-10-09 16:20:26.000000000 -0400
@@ -666,7 +666,10 @@
for (c = s; c < e; c++)
{
if ((c - s) % 4 == 0)
- snprintf (p++, line + sizeof (line) - p, " ");
+ {
+ snprintf (p, line + sizeof (line) - p, " ");
+ p++;
+ }
snprintf (p, line + sizeof (line) - p, "%02x", *c);
p += 2;
}
@@ -678,7 +681,10 @@
for (c = s; c < e; c++)
{
if ((c - s) % 4 == 0)
- snprintf (p++, line + sizeof (line) - p, " ");
+ {
+ snprintf (p, line + sizeof (line) - p, " ");
+ p++;
+ }
snprintf (p, line + sizeof (line) - p, "%02x", *c);
p += 2;
}
Re: Fix another compiler warning [ In reply to ]
On Fri, 10 Oct 2003, Jay Fenlason wrote:

> One of my users was complaing that gcc -Wall was producing some
> warnings. This patch makes two of them go away.

thanks jay.

regards,
--
Paul Jakma paul@clubi.ie paul@jakma.org Key ID: 64A2FF6A
warning: do not ever send email to spam@dishone.st
Fortune:
There is no satisfaction in hanging a man who does not object to it.
-- G.B. Shaw