aboutsummaryrefslogtreecommitdiffstats
path: root/com32
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-03-14 16:51:56 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-03-14 16:51:56 -0700
commitab00ab6c05bab7b6e2814b0ae0cd8fb501c5fd79 (patch)
tree4136ddd943793f96a074233a5ec6f75bd1637526 /com32
parent743eb5ede132f9a00aadf2d5427e9f6fb202a005 (diff)
downloadsyslinux.git-ab00ab6c05bab7b6e2814b0ae0cd8fb501c5fd79.tar.gz
syslinux.git-ab00ab6c05bab7b6e2814b0ae0cd8fb501c5fd79.tar.xz
syslinux.git-ab00ab6c05bab7b6e2814b0ae0cd8fb501c5fd79.zip
hdt: Command-line arguments should be const
Impact: Fix compilation warnings, signatures changes. argc and argv should be const. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32')
-rw-r--r--com32/hdt/hdt-common.c3
-rw-r--r--com32/hdt/hdt-common.h3
-rw-r--r--com32/hdt/hdt.c4
3 files changed, 6 insertions, 4 deletions
diff --git a/com32/hdt/hdt-common.c b/com32/hdt/hdt-common.c
index b6269684..fb0c4c9e 100644
--- a/com32/hdt/hdt-common.c
+++ b/com32/hdt/hdt-common.c
@@ -34,7 +34,8 @@
#include "hdt-common.h"
-void detect_parameters(int argc, char *argv[], struct s_hardware *hardware)
+void detect_parameters(const int argc, const char *argv[],
+ struct s_hardware *hardware)
{
for (int i = 1; i < argc; i++) {
if (!strncmp(argv[i], "modules=", 8)) {
diff --git a/com32/hdt/hdt-common.h b/com32/hdt/hdt-common.h
index 8bec501d..8cdf6636 100644
--- a/com32/hdt/hdt-common.h
+++ b/com32/hdt/hdt-common.h
@@ -129,6 +129,7 @@ int detect_pxe(struct s_hardware *hardware);
void init_hardware(struct s_hardware *hardware);
void clear_screen(void);
void detect_syslinux(struct s_hardware *hardware);
-void detect_parameters(int argc, char *argv[], struct s_hardware *hardware);
+void detect_parameters(const int argc, const char *argv[],
+ struct s_hardware *hardware);
int detect_vesa(struct s_hardware *hardware);
#endif
diff --git a/com32/hdt/hdt.c b/com32/hdt/hdt.c
index 2ff095f9..93e2fa0b 100644
--- a/com32/hdt/hdt.c
+++ b/com32/hdt/hdt.c
@@ -42,10 +42,10 @@
int display_line_nb = 0;
-int main(int argc, char *argv[])
+int main(const int argc, const char *argv[])
{
char version_string[256];
- char *arg;
+ const char *arg;
struct s_hardware hardware;
snprintf(version_string, sizeof version_string, "%s %s by %s",