[pisa-src] r1417 - trunk/libpisa/debug.c

  • From: Thomas Jansen <mithi@xxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Thu, 29 Oct 2009 16:32:06 +0100

Author: tjansen
Date: Thu Oct 29 16:32:05 2009
New Revision: 1417

Log:
Rather than having a pointer to a static char array have the char array
itself.

Fixes warning:
libpisa/debug.c: In function ‘pisa_print_sockaddr’:
libpisa/debug.c:486: warning: initialization discards qualifiers from pointer 
target type

Modified:
   trunk/libpisa/debug.c

Modified: trunk/libpisa/debug.c
==============================================================================
--- trunk/libpisa/debug.c       Thu Oct 29 16:29:27 2009        (r1416)
+++ trunk/libpisa/debug.c       Thu Oct 29 16:32:05 2009        (r1417)
@@ -483,7 +483,7 @@
 void pisa_print_sockaddr(UNUSED const char *file, UNUSED int line, UNUSED 
const char *function,
                        const char *prefix,
                        const struct sockaddr *sockaddr) {
-      char *default_str = "<unknown>";
+      char default_str[] = "<unknown>";
       int maxlen;
       void *addr;
       int family = sockaddr->sa_family;

Other related posts:

  • » [pisa-src] r1417 - trunk/libpisa/debug.c - Thomas Jansen