changeset 1608:efb036167f32

Fix compiler warning
author gthomas
date Fri, 23 Apr 2004 20:55:32 +0000
parents 97461e236a47
children 5e18a98616fe
files packages/hal/powerpc/arch/current/ChangeLog packages/hal/powerpc/arch/current/src/redboot_linux_exec.c
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/packages/hal/powerpc/arch/current/ChangeLog
+++ b/packages/hal/powerpc/arch/current/ChangeLog
@@ -1,3 +1,8 @@
+2004-04-23  Gary Thomas  <gary@mlbassoc.com>
+
+	* src/redboot_linux_exec.c (do_exec): Fix compiler warning about bad
+	cast (dereferencing type-punned pointer will break strict-aliasing rules)
+
 2004-04-22  Jani Monoses <jani@iv.ro>
 
 	 * cdl/hal_powerpc.cdl :
--- a/packages/hal/powerpc/arch/current/src/redboot_linux_exec.c
+++ b/packages/hal/powerpc/arch/current/src/redboot_linux_exec.c
@@ -112,9 +112,9 @@ do_exec(int argc, char *argv[])
     unsigned long sp = CYGMEM_REGION_ram+CYGMEM_REGION_ram_SIZE;
     
     init_opts(&opts[0], 'w', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&wait_time, (bool *)&wait_time_set, "wait timeout");
+              (void *)&wait_time, (bool *)&wait_time_set, "wait timeout");
     init_opts(&opts[1], 'c', true, OPTION_ARG_TYPE_STR, 
-              (void **)&cmd_line, (bool *)&cmd_line_set, "kernel command line");
+              (void *)&cmd_line, (bool *)&cmd_line_set, "kernel command line");
     entry = entry_address;  // Default from last 'load' operation
     if (!scan_opts(argc, argv, 1, opts, 2, (void *)&entry, OPTION_ARG_TYPE_NUM, 
                    "[physical] starting address")) {