[syslinux:elflink] ldlinux: parse_kernel_type() parameter should be const

syslinux-bot for Matt Fleming matt.fleming at intel.com
Tue Apr 17 11:24:12 PDT 2012


Commit-ID:  85598d328b2cc544338c49dc2776ff0bb27a8bd4
Gitweb:     http://www.syslinux.org/commit/85598d328b2cc544338c49dc2776ff0bb27a8bd4
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Mon, 2 Apr 2012 12:41:50 +0100
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Tue, 17 Apr 2012 10:58:33 +0100

ldlinux: parse_kernel_type() parameter should be const

Since we always pass a const char * to parse_kernel_type(), change the
type of the parameter accordingly to get rid of the following
warnings,

ldlinux.c:66:3: warning: passing argument 1 of ‘parse_kernel_type’ discards qual
ifiers from pointer target type
ldlinux.c:14:25: note: expected ‘char *’ but argument is of type ‘const char *’
ldlinux.c:80:2: warning: passing argument 1 of ‘parse_kernel_type’ discards qual
ifiers from pointer target type
ldlinux.c:14:25: note: expected ‘char *’ but argument is of type ‘const char *’
ldlinux.c: In function ‘main’:

Signed-off-by: Matt Fleming <matt.fleming at intel.com>

---
 com32/elflink/ldlinux/ldlinux.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/com32/elflink/ldlinux/ldlinux.c b/com32/elflink/ldlinux/ldlinux.c
index 19524c5..56777b1 100644
--- a/com32/elflink/ldlinux/ldlinux.c
+++ b/com32/elflink/ldlinux/ldlinux.c
@@ -12,7 +12,7 @@
 
 #include <sys/module.h>
 
-static enum kernel_type parse_kernel_type(char *kernel)
+static enum kernel_type parse_kernel_type(const char *kernel)
 {
 	enum kernel_type type;
 	const char *p;


More information about the Syslinux-commits mailing list