aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/ldlinux/readconfig.c
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@linux.intel.com>2011-03-16 13:26:57 +0000
committerMatt Fleming <matt.fleming@linux.intel.com>2011-03-16 14:06:39 +0000
commiteee9ce324a85a4974188b93c6ca6a11020d00c1c (patch)
treee04625e1146849ec6541505b4be735dcbefba44a /com32/elflink/ldlinux/readconfig.c
parent3664450f21f246cf9ebbdc21bf52eb60b6de890e (diff)
downloadsyslinux-eee9ce324a85a4974188b93c6ca6a11020d00c1c.tar.gz
syslinux-eee9ce324a85a4974188b93c6ca6a11020d00c1c.tar.xz
syslinux-eee9ce324a85a4974188b93c6ca6a11020d00c1c.zip
ldlinux: Sprinkle const type qualifers
The following warnings are all caused because we're assigning from const char * to char *. As the strings are never modified, it makes sense to add the const type qualifer instead of casting away const. readconfig.c: In function ‘parse_config_file’: readconfig.c:708:11: warning: assignment discards qualifiers from pointer target type readconfig.c:937:10: warning: assignment discards qualifiers from pointer target type readconfig.c:987:20: warning: assignment discards qualifiers from pointer target type readconfig.c:998:15: warning: assignment discards qualifiers from pointer target type readconfig.c:1004:18: warning: assignment discards qualifiers from pointer target type readconfig.c:1041:11: warning: assignment discards qualifiers from pointer target type Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
Diffstat (limited to 'com32/elflink/ldlinux/readconfig.c')
-rw-r--r--com32/elflink/ldlinux/readconfig.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c
index c618dc00..b6cfb1bd 100644
--- a/com32/elflink/ldlinux/readconfig.c
+++ b/com32/elflink/ldlinux/readconfig.c
@@ -59,8 +59,8 @@ short vkernel = 0; //have we seen any "label" statements?
short displaycon = 1; //conio.inc
short nohalt = 1; //idle.inc
-char *default_cmd = NULL; //"default" command line
-char *onerror = NULL; //"onerror" command line
+const char *default_cmd = NULL; //"default" command line
+const char *onerror = NULL; //"onerror" command line
/* Empty refstring */
const char *empty_string;
@@ -75,7 +75,7 @@ long long totaltimeout = 0;
/* Keep track of global default */
static int has_ui = 0; /* DEFAULT only counts if UI is found */
-extern char *globaldefault;
+extern const char *globaldefault;
static bool menusave = false; /* True if there is any "menu save" */
/* Linked list of all entires, hidden or not; used by unlabel() */
@@ -568,7 +568,7 @@ uint32_t parse_argb(char **p)
* same way as if the files had been concatenated together.
*/
//static const char *append = NULL;
-extern char *append;
+extern const char *append;
//static unsigned int ipappend = 0;
unsigned int ipappend = 0;
static struct labeldata ld;