diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-09-30 20:19:44 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-09-30 20:19:44 -0700 |
commit | af2cc5bc2e13a61e6ab3d495d3edb34d94a42964 (patch) | |
tree | f3cf6b505190ac41b4c683ef74e1b9e6ff5e8c6c | |
parent | 7fbf2ff3c925a0cc55024bc8350ad9e9bf8d1e47 (diff) |
Add const attributes to clear gcc -Wwrite-strings warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r-- | common.c | 6 | ||||
-rw-r--r-- | print_render.c | 4 | ||||
-rw-r--r-- | proto.h | 8 | ||||
-rw-r--r-- | prtype.c | 2 | ||||
-rw-r--r-- | scope.c | 10 |
5 files changed, 15 insertions, 15 deletions
@@ -58,19 +58,19 @@ /* ********************************************** */ void -enterprocedure (char *s) +enterprocedure (const char *s) { debug(2,(stderr, "-> %s\n", s)); } void -warn (char *s) +warn (const char *s) { fprintf(stderr, "####### %s\n", s); } void -panic (char *s) +panic (const char *s) { fprintf(stderr, "%s\n", s); exit(1); diff --git a/print_render.c b/print_render.c index f4dbee0..b6053e8 100644 --- a/print_render.c +++ b/print_render.c @@ -390,7 +390,7 @@ RenderFreeGlyphSet (FD fd, const unsigned char *buf) } static void -PrintGlyphs(const unsigned char *buf, int n, char *name) +PrintGlyphs(const unsigned char *buf, int n, const char *name) { const unsigned char *gids; const unsigned char *glyphs; @@ -452,7 +452,7 @@ RenderFreeGlyphs (FD fd, const unsigned char *buf) } static void -PrintGlyphList(const unsigned char *buf, int length, char *name, int size) +PrintGlyphList(const unsigned char *buf, int length, const char *name, int size) { short n; @@ -1,9 +1,9 @@ #include "x11.h" /* common.c */ -extern void enterprocedure (char *s); -extern void warn (char *s); -extern void panic (char *s); +extern void enterprocedure (const char *s); +extern void warn (const char *s); +extern void panic (const char *s); extern void SetSignalHandling (void); extern void SetUpConnectionSocket (int iport, void (*connectionFunc) (int)); @@ -266,7 +266,7 @@ extern void SetUpPair (FD client, FD server); extern FD FDPair (FD fd); extern FD ClientHalf (FD fd); extern FD ServerHalf (FD fd); -extern char *ClientName (FD fd); +extern const char *ClientName (FD fd); extern int ClientNumber (FD fd); extern void NewConnection (FD fd); extern void FlushFD (FD fd); @@ -68,7 +68,7 @@ /* print representation of a character for debugging */ -static char * +static const char * printrep (unsigned short c) { static char pr[8]; @@ -131,11 +131,11 @@ static CMDResult CMDQuit (int argc, char **argv); static CMDResult CMDHelp (int argc, char **argv); typedef struct _CMDFunc { - char *name; - char *alias; + const char *name; + const char *alias; CMDResult (*func)(int argc, char **argv); - char *usage; - char *help; + const char *usage; + const char *help; } CMDFuncRec; typedef const CMDFuncRec *CMDFuncPtr; @@ -1050,7 +1050,7 @@ ServerHalf ( return(FDinfo[fd].pair); } -char * +const char * ClientName ( FD fd) { |