bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test-base64 warnings


From: Simon Josefsson
Subject: Re: test-base64 warnings
Date: Fri, 30 May 2008 10:40:28 +0200
User-agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux)

Simon Josefsson <address@hidden> writes:

> Hi Bruno.  Thanks for finding these.  For some reason, I can't reproduce
> the warnings even with -Wall (gcc 4.2.3).  But the warnings seems
> correct.  Patch below pushed.

I was able to reproduce the warnings... and found a silly typo.  I've
pushed this fix.

/Simon

>From 9b53901230a039359dc8688a50781b6f54b061b1 Mon Sep 17 00:00:00 2001
From: Simon Josefsson <address@hidden>
Date: Fri, 30 May 2008 10:38:57 +0200
Subject: [PATCH] Fix typo.

---
 tests/test-base64.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/test-base64.c b/tests/test-base64.c
index c8b2a2d..f707a9e 100644
--- a/tests/test-base64.c
+++ b/tests/test-base64.c
@@ -118,7 +118,7 @@ main (int argc, char *argv[])
   if (!ok)
     fprintf (stderr, "decode failed\n");
   if (len != 0)
-    fprintf (stderr, "failure (%ul)\n", (unsigned long) len);
+    fprintf (stderr, "failure (%lu)\n", (unsigned long) len);
 
   memset (out, 0x42, sizeof (out));
   len = 1;
@@ -128,7 +128,7 @@ main (int argc, char *argv[])
   if (len != 1 || memcmp (out, "abcdefg", 1) != 0)
     {
       out[2] = '\0';
-      fprintf (stderr, "failure (%ul: %s)\n", (unsigned long) len, out);
+      fprintf (stderr, "failure (%lu: %s)\n", (unsigned long) len, out);
     }
 
   memset (out, 0x42, sizeof (out));
@@ -139,7 +139,7 @@ main (int argc, char *argv[])
   if (len != 2 || memcmp (out, "abcdefg", 2) != 0)
     {
       out[3] = '\0';
-      fprintf (stderr, "failure (%ul: %s)\n", (unsigned long) len, out);
+      fprintf (stderr, "failure (%lu: %s)\n", (unsigned long) len, out);
     }
 
   memset (out, 0x42, sizeof (out));
@@ -150,7 +150,7 @@ main (int argc, char *argv[])
   if (len != 3 || memcmp (out, "abcdefg", 3) != 0)
     {
       out[4] = '\0';
-      fprintf (stderr, "failure (%ul: %s)\n", (unsigned long) len, out);
+      fprintf (stderr, "failure (%lu: %s)\n", (unsigned long) len, out);
     }
 
   memset (out, 0x42, sizeof (out));
@@ -161,7 +161,7 @@ main (int argc, char *argv[])
   if (len != 3 || memcmp (out, "abcdefg", 3) != 0)
     {
       out[3] = '\0';
-      fprintf (stderr, "failure (%ul: %s)\n", (unsigned long) len, out);
+      fprintf (stderr, "failure (%lu: %s)\n", (unsigned long) len, out);
     }
 
   memset (out, 0x42, sizeof (out));
@@ -172,7 +172,7 @@ main (int argc, char *argv[])
   if (len != 7 || memcmp (out, "abcdefg", 7) != 0)
     {
       out[7] = '\0';
-      fprintf (stderr, "failure (%ul: %s)\n", (unsigned long) len, out);
+      fprintf (stderr, "failure (%lu: %s)\n", (unsigned long) len, out);
     }
 
   return 0;
-- 
1.5.5.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]