mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-10 21:38:50 +01:00
* 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 *.
This commit is contained in:
parent
c0d7fa368e
commit
a635daa6b6
@ -1,3 +1,10 @@
|
|||||||
|
2005-12-06 David Shaw <dshaw@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@jabberwocky.com>
|
2005-11-02 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* util.c [!HAVE_DECL_GETPAGESIZE]: Prototype getpagesize() if
|
* util.c [!HAVE_DECL_GETPAGESIZE]: Prototype getpagesize() if
|
||||||
|
@ -139,7 +139,7 @@ _assuan_read_line (assuan_context_t ctx)
|
|||||||
if (ctx->log_fp)
|
if (ctx->log_fp)
|
||||||
fprintf (ctx->log_fp, "%s[%u.%p] DBG: <- [Error: %s]\n",
|
fprintf (ctx->log_fp, "%s[%u.%p] DBG: <- [Error: %s]\n",
|
||||||
assuan_get_assuan_log_prefix (),
|
assuan_get_assuan_log_prefix (),
|
||||||
(unsigned int)getpid (), ctx, strerror (errno));
|
(unsigned int)getpid (), (void *)ctx, strerror (errno));
|
||||||
return ASSUAN_Read_Error;
|
return ASSUAN_Read_Error;
|
||||||
}
|
}
|
||||||
if (!nread)
|
if (!nread)
|
||||||
@ -148,7 +148,7 @@ _assuan_read_line (assuan_context_t ctx)
|
|||||||
if (ctx->log_fp)
|
if (ctx->log_fp)
|
||||||
fprintf (ctx->log_fp, "%s[%u.%p] DBG: <- [EOF]\n",
|
fprintf (ctx->log_fp, "%s[%u.%p] DBG: <- [EOF]\n",
|
||||||
assuan_get_assuan_log_prefix (),
|
assuan_get_assuan_log_prefix (),
|
||||||
(unsigned int)getpid (), ctx);
|
(unsigned int)getpid (), (void *)ctx);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,7 +181,7 @@ _assuan_read_line (assuan_context_t ctx)
|
|||||||
{
|
{
|
||||||
fprintf (ctx->log_fp, "%s[%u.%p] DBG: <- ",
|
fprintf (ctx->log_fp, "%s[%u.%p] DBG: <- ",
|
||||||
assuan_get_assuan_log_prefix (),
|
assuan_get_assuan_log_prefix (),
|
||||||
(unsigned int)getpid (), ctx);
|
(unsigned int)getpid (), (void *)ctx);
|
||||||
if (ctx->confidential)
|
if (ctx->confidential)
|
||||||
fputs ("[Confidential data not shown]", ctx->log_fp);
|
fputs ("[Confidential data not shown]", ctx->log_fp);
|
||||||
else
|
else
|
||||||
@ -197,7 +197,7 @@ _assuan_read_line (assuan_context_t ctx)
|
|||||||
if (ctx->log_fp)
|
if (ctx->log_fp)
|
||||||
fprintf (ctx->log_fp, "%s[%u.%p] DBG: <- [Invalid line]\n",
|
fprintf (ctx->log_fp, "%s[%u.%p] DBG: <- [Invalid line]\n",
|
||||||
assuan_get_assuan_log_prefix (),
|
assuan_get_assuan_log_prefix (),
|
||||||
(unsigned int)getpid (), ctx);
|
(unsigned int)getpid (), (void *)ctx);
|
||||||
*line = 0;
|
*line = 0;
|
||||||
ctx->inbound.linelen = 0;
|
ctx->inbound.linelen = 0;
|
||||||
return ctx->inbound.eof ? ASSUAN_Line_Not_Terminated
|
return ctx->inbound.eof ? ASSUAN_Line_Not_Terminated
|
||||||
@ -253,7 +253,7 @@ _assuan_write_line (assuan_context_t ctx, const char *prefix,
|
|||||||
fprintf (ctx->log_fp, "%s[%u.%p] DBG: -> "
|
fprintf (ctx->log_fp, "%s[%u.%p] DBG: -> "
|
||||||
"[supplied line too long -truncated]\n",
|
"[supplied line too long -truncated]\n",
|
||||||
assuan_get_assuan_log_prefix (),
|
assuan_get_assuan_log_prefix (),
|
||||||
(unsigned int)getpid (), ctx);
|
(unsigned int)getpid (), (void *)ctx);
|
||||||
if (prefixlen > 5)
|
if (prefixlen > 5)
|
||||||
prefixlen = 5;
|
prefixlen = 5;
|
||||||
if (len > ASSUAN_LINELENGTH - prefixlen - 2)
|
if (len > ASSUAN_LINELENGTH - prefixlen - 2)
|
||||||
@ -265,7 +265,7 @@ _assuan_write_line (assuan_context_t ctx, const char *prefix,
|
|||||||
{
|
{
|
||||||
fprintf (ctx->log_fp, "%s[%u.%p] DBG: -> ",
|
fprintf (ctx->log_fp, "%s[%u.%p] DBG: -> ",
|
||||||
assuan_get_assuan_log_prefix (),
|
assuan_get_assuan_log_prefix (),
|
||||||
(unsigned int)getpid (), ctx);
|
(unsigned int)getpid (), (void *)ctx);
|
||||||
if (ctx->confidential)
|
if (ctx->confidential)
|
||||||
fputs ("[Confidential data not shown]", ctx->log_fp);
|
fputs ("[Confidential data not shown]", ctx->log_fp);
|
||||||
else
|
else
|
||||||
@ -313,7 +313,7 @@ assuan_write_line (assuan_context_t ctx, const char *line)
|
|||||||
fprintf (ctx->log_fp, "%s[%u.%p] DBG: -> "
|
fprintf (ctx->log_fp, "%s[%u.%p] DBG: -> "
|
||||||
"[supplied line contained a LF -truncated]\n",
|
"[supplied line contained a LF -truncated]\n",
|
||||||
assuan_get_assuan_log_prefix (),
|
assuan_get_assuan_log_prefix (),
|
||||||
(unsigned int)getpid (), ctx);
|
(unsigned int)getpid (), (void *)ctx);
|
||||||
|
|
||||||
return _assuan_write_line (ctx, NULL, line, len);
|
return _assuan_write_line (ctx, NULL, line, len);
|
||||||
}
|
}
|
||||||
@ -370,7 +370,7 @@ _assuan_cookie_write_data (void *cookie, const char *buffer, size_t orig_size)
|
|||||||
{
|
{
|
||||||
fprintf (ctx->log_fp, "%s[%u.%p] DBG: -> ",
|
fprintf (ctx->log_fp, "%s[%u.%p] DBG: -> ",
|
||||||
assuan_get_assuan_log_prefix (),
|
assuan_get_assuan_log_prefix (),
|
||||||
(unsigned int)getpid (), ctx);
|
(unsigned int)getpid (), (void *)ctx);
|
||||||
|
|
||||||
if (ctx->confidential)
|
if (ctx->confidential)
|
||||||
fputs ("[Confidential data not shown]", ctx->log_fp);
|
fputs ("[Confidential data not shown]", ctx->log_fp);
|
||||||
@ -418,7 +418,7 @@ _assuan_cookie_write_flush (void *cookie)
|
|||||||
{
|
{
|
||||||
fprintf (ctx->log_fp, "%s[%u.%p] DBG: -> ",
|
fprintf (ctx->log_fp, "%s[%u.%p] DBG: -> ",
|
||||||
assuan_get_assuan_log_prefix (),
|
assuan_get_assuan_log_prefix (),
|
||||||
(unsigned int)getpid (), ctx);
|
(unsigned int)getpid (), (void *)ctx);
|
||||||
if (ctx->confidential)
|
if (ctx->confidential)
|
||||||
fputs ("[Confidential data not shown]", ctx->log_fp);
|
fputs ("[Confidential data not shown]", ctx->log_fp);
|
||||||
else
|
else
|
||||||
|
@ -145,10 +145,10 @@ create_dotlock( const char *file_to_lock )
|
|||||||
h->tname = xmalloc( dirpartlen + 6+30+ strlen(nodename) + 11 );
|
h->tname = xmalloc( dirpartlen + 6+30+ strlen(nodename) + 11 );
|
||||||
#ifndef __riscos__
|
#ifndef __riscos__
|
||||||
sprintf( h->tname, "%.*s/.#lk%p.%s.%d",
|
sprintf( h->tname, "%.*s/.#lk%p.%s.%d",
|
||||||
dirpartlen, dirpart, h, nodename, (int)getpid() );
|
dirpartlen, dirpart, (void *)h, nodename, (int)getpid() );
|
||||||
#else /* __riscos__ */
|
#else /* __riscos__ */
|
||||||
sprintf( h->tname, "%.*s.lk%p/%s/%d",
|
sprintf( h->tname, "%.*s.lk%p/%s/%d",
|
||||||
dirpartlen, dirpart, h, nodename, (int)getpid() );
|
dirpartlen, dirpart, (void *)h, nodename, (int)getpid() );
|
||||||
#endif /* __riscos__ */
|
#endif /* __riscos__ */
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
char *mkdtemp(char *template)
|
char *mkdtemp(char *template)
|
||||||
{
|
{
|
||||||
unsigned int attempts,idx,count=0;
|
unsigned int attempts,idx,count=0;
|
||||||
byte *ch;
|
char *ch;
|
||||||
|
|
||||||
idx=strlen(template);
|
idx=strlen(template);
|
||||||
|
|
||||||
|
@ -409,7 +409,7 @@ secmexrealloc( void *p, size_t newsize )
|
|||||||
mb = (MEMBLOCK*)((char*)p - ((size_t) &((MEMBLOCK*)0)->u.aligned.c));
|
mb = (MEMBLOCK*)((char*)p - ((size_t) &((MEMBLOCK*)0)->u.aligned.c));
|
||||||
size = mb->size;
|
size = mb->size;
|
||||||
if (size < sizeof(MEMBLOCK))
|
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);
|
size -= ((size_t) &((MEMBLOCK*)0)->u.aligned.c);
|
||||||
|
|
||||||
if( newsize <= size )
|
if( newsize <= size )
|
||||||
|
Loading…
Reference in New Issue
Block a user