[svn] GnuPG - r3950 - trunk/util

svn author dshaw cvs at cvs.gnupg.org
Tue Dec 6 19:24:58 CET 2005


Author: dshaw
Date: 2005-12-06 19:24:57 +0100 (Tue, 06 Dec 2005)
New Revision: 3950

Modified:
   trunk/util/ChangeLog
   trunk/util/assuan-buffer.c
   trunk/util/dotlock.c
   trunk/util/mkdtemp.c
   trunk/util/secmem.c
Log:
* mkdtemp.c (mkdtemp): Fix warning.

* secmem.c, assuan-buffer.c, dotlock.c: Fix a few warnings from printf-ing
%p where the arg wasn't void *.


Modified: trunk/util/ChangeLog
===================================================================
--- trunk/util/ChangeLog	2005-12-06 17:13:44 UTC (rev 3949)
+++ trunk/util/ChangeLog	2005-12-06 18:24:57 UTC (rev 3950)
@@ -1,3 +1,10 @@
+2005-12-06  David Shaw  <dshaw at jabberwocky.com>
+
+	* mkdtemp.c (mkdtemp): Fix warning.
+
+	* secmem.c, assuan-buffer.c, dotlock.c: Fix a few warnings from
+	printf-ing %p where the arg wasn't void *.
+
 2005-11-02  David Shaw  <dshaw at jabberwocky.com>
 
 	* util.c [!HAVE_DECL_GETPAGESIZE]: Prototype getpagesize() if

Modified: trunk/util/assuan-buffer.c
===================================================================
--- trunk/util/assuan-buffer.c	2005-12-06 17:13:44 UTC (rev 3949)
+++ trunk/util/assuan-buffer.c	2005-12-06 18:24:57 UTC (rev 3950)
@@ -139,7 +139,7 @@
       if (ctx->log_fp)
 	fprintf (ctx->log_fp, "%s[%u.%p] DBG: <- [Error: %s]\n",
 		 assuan_get_assuan_log_prefix (),
-                 (unsigned int)getpid (), ctx, strerror (errno));
+                 (unsigned int)getpid (), (void *)ctx, strerror (errno));
       return ASSUAN_Read_Error;
     }
   if (!nread)
@@ -148,7 +148,7 @@
       if (ctx->log_fp)
 	fprintf (ctx->log_fp, "%s[%u.%p] DBG: <- [EOF]\n",
 		 assuan_get_assuan_log_prefix (),
-                 (unsigned int)getpid (), ctx);
+                 (unsigned int)getpid (), (void *)ctx);
       return -1;
     }
 
@@ -181,7 +181,7 @@
 	{
 	  fprintf (ctx->log_fp, "%s[%u.%p] DBG: <- ",
 		   assuan_get_assuan_log_prefix (),
-                   (unsigned int)getpid (), ctx);
+                   (unsigned int)getpid (), (void *)ctx);
 	  if (ctx->confidential)
 	    fputs ("[Confidential data not shown]", ctx->log_fp);
 	  else
@@ -197,7 +197,7 @@
       if (ctx->log_fp)
 	fprintf (ctx->log_fp, "%s[%u.%p] DBG: <- [Invalid line]\n",
 		 assuan_get_assuan_log_prefix (),
-                 (unsigned int)getpid (), ctx);
+                 (unsigned int)getpid (), (void *)ctx);
       *line = 0;
       ctx->inbound.linelen = 0;
       return ctx->inbound.eof ? ASSUAN_Line_Not_Terminated
@@ -253,7 +253,7 @@
         fprintf (ctx->log_fp, "%s[%u.%p] DBG: -> "
                  "[supplied line too long -truncated]\n",
                  assuan_get_assuan_log_prefix (),
-                 (unsigned int)getpid (), ctx);
+                 (unsigned int)getpid (), (void *)ctx);
       if (prefixlen > 5)
         prefixlen = 5;
       if (len > ASSUAN_LINELENGTH - prefixlen - 2)
@@ -265,7 +265,7 @@
     {
       fprintf (ctx->log_fp, "%s[%u.%p] DBG: -> ",
 	       assuan_get_assuan_log_prefix (),
-               (unsigned int)getpid (), ctx);
+               (unsigned int)getpid (), (void *)ctx);
       if (ctx->confidential)
 	fputs ("[Confidential data not shown]", ctx->log_fp);
       else
@@ -313,7 +313,7 @@
     fprintf (ctx->log_fp, "%s[%u.%p] DBG: -> "
              "[supplied line contained a LF -truncated]\n",
              assuan_get_assuan_log_prefix (),
-             (unsigned int)getpid (), ctx);
+             (unsigned int)getpid (), (void *)ctx);
 
   return _assuan_write_line (ctx, NULL, line, len);
 }
@@ -370,7 +370,7 @@
             {
 	      fprintf (ctx->log_fp, "%s[%u.%p] DBG: -> ",
 		       assuan_get_assuan_log_prefix (),
-                       (unsigned int)getpid (), ctx);
+                       (unsigned int)getpid (), (void *)ctx);
 
               if (ctx->confidential)
                 fputs ("[Confidential data not shown]", ctx->log_fp);
@@ -418,7 +418,7 @@
 	{
 	  fprintf (ctx->log_fp, "%s[%u.%p] DBG: -> ",
 		   assuan_get_assuan_log_prefix (),
-                   (unsigned int)getpid (), ctx);
+                   (unsigned int)getpid (), (void *)ctx);
 	  if (ctx->confidential)
 	    fputs ("[Confidential data not shown]", ctx->log_fp);
 	  else

Modified: trunk/util/dotlock.c
===================================================================
--- trunk/util/dotlock.c	2005-12-06 17:13:44 UTC (rev 3949)
+++ trunk/util/dotlock.c	2005-12-06 18:24:57 UTC (rev 3950)
@@ -145,10 +145,10 @@
     h->tname = xmalloc( dirpartlen + 6+30+ strlen(nodename) + 11 );
 #ifndef __riscos__
     sprintf( h->tname, "%.*s/.#lk%p.%s.%d",
-	     dirpartlen, dirpart, h, nodename, (int)getpid() );
+	     dirpartlen, dirpart, (void *)h, nodename, (int)getpid() );
 #else /* __riscos__ */
     sprintf( h->tname, "%.*s.lk%p/%s/%d",
-	     dirpartlen, dirpart, h, nodename, (int)getpid() );
+	     dirpartlen, dirpart, (void *)h, nodename, (int)getpid() );
 #endif /* __riscos__ */
 
     do {

Modified: trunk/util/mkdtemp.c
===================================================================
--- trunk/util/mkdtemp.c	2005-12-06 17:13:44 UTC (rev 3949)
+++ trunk/util/mkdtemp.c	2005-12-06 18:24:57 UTC (rev 3950)
@@ -40,7 +40,7 @@
 char *mkdtemp(char *template)
 {
   unsigned int attempts,idx,count=0;
-  byte *ch;
+  char *ch;
 
   idx=strlen(template);
 

Modified: trunk/util/secmem.c
===================================================================
--- trunk/util/secmem.c	2005-12-06 17:13:44 UTC (rev 3949)
+++ trunk/util/secmem.c	2005-12-06 18:24:57 UTC (rev 3950)
@@ -409,7 +409,7 @@
     mb = (MEMBLOCK*)((char*)p - ((size_t) &((MEMBLOCK*)0)->u.aligned.c));
     size = mb->size;
     if (size < sizeof(MEMBLOCK))
-      log_bug ("secure memory corrupted at block %p\n", mb);
+      log_bug ("secure memory corrupted at block %p\n", (void *)mb);
     size -= ((size_t) &((MEMBLOCK*)0)->u.aligned.c);
 
     if( newsize <= size )




More information about the Gnupg-commits mailing list