This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Redboot patch (compiler warnings) - attachment


On Tue, 2004-02-24 at 02:20, Uwe Kindler wrote:
> The attached patch removes a lot of compiler warnings from RedBoot build
> process.

Committed, with some minor changes, thanks.

A couple of notes for next time:
  * Please make your patches relative to the packages directory.  That 
    way it's 100% obvious what file is being changed (and they are 
    easier to apply)
  * Please provide patches against the _current_ CVS.  I had to apply
    a number of your changes by hand because the patches failed.

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates
Index: redboot/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/ChangeLog,v
retrieving revision 1.182
diff -u -5 -p -r1.182 ChangeLog
--- redboot/current/ChangeLog	20 Feb 2004 03:38:17 -0000	1.182
+++ redboot/current/ChangeLog	24 Feb 2004 13:36:02 -0000
@@ -1,5 +1,19 @@
+2004-02-23  Uwe Kindler  <uwe_kindler@web.de>
+
+	* src/cksum.c:
+	* src/dump.c:
+	* src/fconfig.c:
+	* src/flash.c:
+	* src/load.c:
+	* src/main.c:
+	* src/mcmp.c:
+	* src/mcopy.c:
+	* src/mfill.c:
+	* src/net/net_io.c:
+	* src/net/ping.c: Minor cleanups to remove warnings.
+
 2004-02-20  Jonathan Larmour  <jifl@eCosCentric.com>
 
 	* doc/redboot.sgml: Document lowering security level for TFTP to
 	work on more recent Red Hat Linux.
 
Index: redboot/current/src/cksum.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/src/cksum.c,v
retrieving revision 1.2
diff -u -5 -p -r1.2 cksum.c
--- redboot/current/src/cksum.c	12 Aug 2002 07:54:54 -0000	1.2
+++ redboot/current/src/cksum.c	24 Feb 2004 13:34:12 -0000
@@ -69,13 +69,13 @@ do_cksum(int argc, char *argv[])
     struct option_info opts[2];
     unsigned long base, len, crc;
     bool base_set, len_set;
 
     init_opts(&opts[0], 'b', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&base, (bool *)&base_set, "base address");
+              (void *)&base, (bool *)&base_set, "base address");
     init_opts(&opts[1], 'l', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&len, (bool *)&len_set, "length");
+              (void *)&len, (bool *)&len_set, "length");
     if (!scan_opts(argc, argv, 1, opts, 2, 0, 0, "")) {
         return;
     }
     if (!base_set || !len_set) {
 	if (load_address >= (CYG_ADDRESS)ram_start &&
Index: redboot/current/src/dump.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/src/dump.c,v
retrieving revision 1.1
diff -u -5 -p -r1.1 dump.c
--- redboot/current/src/dump.c	6 Aug 2002 14:29:12 -0000	1.1
+++ redboot/current/src/dump.c	24 Feb 2004 13:34:12 -0000
@@ -77,21 +77,21 @@ do_dump(int argc, char *argv[])
     bool srec_dump, set_32bit, set_16bit, set_8bit;
     int i, n, off, cksum;
     cyg_uint8 ch;
 
     init_opts(&opts[0], 'b', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&base, (bool *)&base_set, "base address");
+              (void *)&base, (bool *)&base_set, "base address");
     init_opts(&opts[1], 'l', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&len, (bool *)&len_set, "length");
+              (void *)&len, (bool *)&len_set, "length");
     init_opts(&opts[2], 's', false, OPTION_ARG_TYPE_FLG, 
-              (void **)&srec_dump, 0, "dump data using Morotola S-records");
+              (void *)&srec_dump, 0, "dump data using Morotola S-records");
     init_opts(&opts[3], '4', false, OPTION_ARG_TYPE_FLG,
               (void *)&set_32bit, (bool *)0, "dump 32 bit units");
     init_opts(&opts[4], '2', false, OPTION_ARG_TYPE_FLG,
-              (void **)&set_16bit, (bool *)0, "dump 16 bit units");
+              (void *)&set_16bit, (bool *)0, "dump 16 bit units");
     init_opts(&opts[5], '1', false, OPTION_ARG_TYPE_FLG,
-              (void **)&set_8bit, (bool *)0, "dump 8 bit units");
+              (void *)&set_8bit, (bool *)0, "dump 8 bit units");
     if (!scan_opts(argc, argv, 1, opts, 6, 0, 0, "")) {
         return;
     }
     if (!base_set) {
         if (_base == 0) {
Index: redboot/current/src/fconfig.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/src/fconfig.c,v
retrieving revision 1.8
diff -u -5 -p -r1.8 fconfig.c
--- redboot/current/src/fconfig.c	21 Dec 2003 13:17:52 -0000	1.8
+++ redboot/current/src/fconfig.c	24 Feb 2004 14:04:14 -0000
@@ -58,10 +58,11 @@
 #include <fis.h>
 #endif
 
 #ifdef CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG
 // Note horrid intertwining of functions, to save precious FLASH
+externC void fis_update_directory(void);
 #endif
 
 #ifdef CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_EEPROM
 externC void write_eeprom(void *buf, int len);
 externC void read_eeprom(void *buf, int len);
@@ -69,10 +70,15 @@ externC void read_eeprom(void *buf, int 
 
 #ifdef CYGSEM_REDBOOT_PLF_ESA_VALIDATE
 externC bool cyg_plf_redboot_esa_validate(unsigned char *val);
 #endif
 
+#ifdef CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_FLASH
+externC bool do_flash_init(void);
+externC int flash_read(void *flash_base, void *ram_base, int len, void **err_address);
+#endif
+
 // Round a quantity up
 #define _rup(n,s) ((((n)+(s-1))/s)*s)
 
 #include <flash_config.h>
 
@@ -464,19 +470,19 @@ do_flash_config(int argc, char *argv[])
 #endif
     memcpy(backup_config, config, sizeof(struct _config));
     script = (unsigned char *)0;
 
     init_opts(&opts[0], 'l', false, OPTION_ARG_TYPE_FLG, 
-              (void **)&list_only, (bool *)0, "list configuration only");
+              (void *)&list_only, (bool *)0, "list configuration only");
     init_opts(&opts[1], 'n', false, OPTION_ARG_TYPE_FLG, 
-              (void **)&nicknames, (bool *)0, "show nicknames");
+              (void *)&nicknames, (bool *)0, "show nicknames");
     init_opts(&opts[2], 'f', false, OPTION_ARG_TYPE_FLG, 
-              (void **)&fullnames, (bool *)0, "show full names");
+              (void *)&fullnames, (bool *)0, "show full names");
     init_opts(&opts[3], 'i', false, OPTION_ARG_TYPE_FLG, 
-              (void **)&init, (bool *)0, "initialize configuration database");
+              (void *)&init, (bool *)0, "initialize configuration database");
     init_opts(&opts[4], 'd', false, OPTION_ARG_TYPE_FLG, 
-              (void **)&dumbterminal, (bool *)0, "dumb terminal: no clever edits");
+              (void *)&dumbterminal, (bool *)0, "dumb terminal: no clever edits");
 
     // First look to see if we are setting or getting a single option
     // by just quoting its nickname
     if ( (2 == argc && '-' != argv[1][0]) ||
          (3 == argc && '-' != argv[1][0] && '-' != argv[2][0])) {
@@ -682,24 +688,26 @@ flash_lookup_alias(char *alias, char *al
 //
 void
 flash_write_config(bool prompt)
 {
 #if defined(CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_FLASH)
-    int stat;
     void *err_addr;
+#if !defined(CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG)
+    int stat;
+#endif
 #endif
 
     config->len = sizeof(struct _config);
     config->key1 = CONFIG_KEY1;  
     config->key2 = CONFIG_KEY2;
     config->cksum = cyg_crc32((unsigned char *)config, sizeof(struct _config)-sizeof(config->cksum));
     if (!prompt || verify_action("Update RedBoot non-volatile configuration")) {
 #ifdef CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_FLASH
 #ifdef CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG
-        memcpy(fis_work_block, fis_addr, fisdir_size);
+        flash_read(fis_addr, fis_work_block, fisdir_size, (void **)&err_addr);
         fis_update_directory();
-#else //  CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG
+#else 
 #ifdef CYGSEM_REDBOOT_FLASH_LOCK_SPECIAL
         // Insure [quietly] that the config page is unlocked before trying to update
         flash_unlock((void *)cfg_base, cfg_size, (void **)&err_addr);
 #endif
         if ((stat = flash_erase(cfg_base, cfg_size, (void **)&err_addr)) != 0) {
@@ -713,12 +721,12 @@ flash_write_config(bool prompt)
         }
 #ifdef CYGSEM_REDBOOT_FLASH_LOCK_SPECIAL
         // Insure [quietly] that the config data is locked after the update
         flash_lock((void *)cfg_base, cfg_size, (void **)&err_addr);
 #endif
-#endif
-#else
+#endif // CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG
+#else  // CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_FLASH
         write_eeprom(config, sizeof(struct _config));  // into 'config'
 #endif
     }
 }
 
@@ -1026,12 +1034,14 @@ config_init(void)
 //
 static void
 load_flash_config(void)
 {
     bool use_boot_script;
-    void *err_addr;
     unsigned char *cfg_temp = (unsigned char *)workspace_end;
+#ifdef CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_FLASH
+    void *err_addr;
+#endif
 
     config_ok = false;
     script = (unsigned char *)0;
     cfg_temp -= sizeof(struct _config);  // Space for primary config data
     config = (struct _config *)cfg_temp;
Index: redboot/current/src/flash.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/src/flash.c,v
retrieving revision 1.63
diff -u -5 -p -r1.63 flash.c
--- redboot/current/src/flash.c	11 Feb 2004 13:40:53 -0000	1.63
+++ redboot/current/src/flash.c	24 Feb 2004 13:53:45 -0000
@@ -247,11 +247,11 @@ fis_init(int argc, char *argv[])
     struct option_info opts[1];
     CYG_ADDRESS redboot_flash_start;
     unsigned long redboot_image_size;
 
     init_opts(&opts[0], 'f', false, OPTION_ARG_TYPE_FLG, 
-              (void **)&full_init, (bool *)0, "full initialization, erases all of flash");
+              (void *)&full_init, (bool *)0, "full initialization, erases all of flash");
     if (!scan_opts(argc, argv, 2, opts, 1, 0, 0, ""))
     {
         return;
     }
 
@@ -457,14 +457,14 @@ fis_list(int argc, char *argv[])
     arm_fis_list();
     return;
 #endif
 
     init_opts(&opts[0], 'd', false, OPTION_ARG_TYPE_FLG, 
-              (void **)&show_datalen, (bool *)0, "display data length");
+              (void *)&show_datalen, (bool *)0, "display data length");
 #ifdef CYGSEM_REDBOOT_FIS_CRC_CHECK
     init_opts(&opts[1], 'c', false, OPTION_ARG_TYPE_FLG, 
-              (void **)&show_cksums, (bool *)0, "display checksums");
+              (void *)&show_cksums, (bool *)0, "display checksums");
     i = 2;
 #else
     i = 1;
 #endif
     if (!scan_opts(argc, argv, 2, opts, i, 0, 0, "")) {
@@ -703,23 +703,23 @@ fis_create(int argc, char *argv[])
     bool defaults_assumed;
     struct option_info opts[7];
     bool prog_ok = true;
 
     init_opts(&opts[0], 'b', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&mem_addr, (bool *)&mem_addr_set, "memory base address");
+              (void *)&mem_addr, (bool *)&mem_addr_set, "memory base address");
     init_opts(&opts[1], 'r', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&exec_addr, (bool *)&exec_addr_set, "ram base address");
+              (void *)&exec_addr, (bool *)&exec_addr_set, "ram base address");
     init_opts(&opts[2], 'e', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&entry_addr, (bool *)&entry_addr_set, "entry point address");
+              (void *)&entry_addr, (bool *)&entry_addr_set, "entry point address");
     init_opts(&opts[3], 'f', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&flash_addr, (bool *)&flash_addr_set, "FLASH memory base address");
+              (void *)&flash_addr, (bool *)&flash_addr_set, "FLASH memory base address");
     init_opts(&opts[4], 'l', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&length, (bool *)&length_set, "image length [in FLASH]");
+              (void *)&length, (bool *)&length_set, "image length [in FLASH]");
     init_opts(&opts[5], 's', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&img_size, (bool *)&img_size_set, "image size [actual data]");
+              (void *)&img_size, (bool *)&img_size_set, "image size [actual data]");
     init_opts(&opts[6], 'n', false, OPTION_ARG_TYPE_FLG, 
-              (void **)&no_copy, (bool *)0, "don't copy from RAM to FLASH, just update directory");
+              (void *)&no_copy, (bool *)0, "don't copy from RAM to FLASH, just update directory");
     if (!scan_opts(argc, argv, 2, opts, 7, (void *)&name, OPTION_ARG_TYPE_STR, "file name"))
     {
         fis_usage("invalid arguments");
         return;
     }
@@ -918,11 +918,11 @@ fis_delete(int argc, char *argv[])
     char *name;
     int num_reserved, i, stat;
     void *err_addr;
     struct fis_image_desc *img;
 
-    if (!scan_opts(argc, argv, 2, 0, 0, (void **)&name, OPTION_ARG_TYPE_STR, "image name"))
+    if (!scan_opts(argc, argv, 2, 0, 0, (void *)&name, OPTION_ARG_TYPE_STR, "image name"))
     {
         fis_usage("invalid arguments");
         return;
     }
 #ifdef CYGHWR_REDBOOT_ARM_FLASH_SIB
@@ -990,21 +990,21 @@ fis_load(int argc, char *argv[])
     bool decompress = false;
 #endif
     void *err_addr;
 
     init_opts(&opts[0], 'b', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&mem_addr, (bool *)&mem_addr_set, "memory [load] base address");
+              (void *)&mem_addr, (bool *)&mem_addr_set, "memory [load] base address");
     init_opts(&opts[1], 'c', false, OPTION_ARG_TYPE_FLG, 
-              (void **)&show_cksum, (bool *)0, "display checksum");
+              (void *)&show_cksum, (bool *)0, "display checksum");
     num_options = 2;
 #ifdef CYGPRI_REDBOOT_ZLIB_FLASH
     init_opts(&opts[num_options], 'd', false, OPTION_ARG_TYPE_FLG, 
-              (void **)&decompress, 0, "decompress");
+              (void *)&decompress, 0, "decompress");
     num_options++;
 #endif
 
-    if (!scan_opts(argc, argv, 2, opts, num_options, (void **)&name, OPTION_ARG_TYPE_STR, "image name"))
+    if (!scan_opts(argc, argv, 2, opts, num_options, (void *)&name, OPTION_ARG_TYPE_STR, "image name"))
     {
         fis_usage("invalid arguments");
         return;
     }
     if ((img = fis_lookup(name, NULL)) == (struct fis_image_desc *)0) {
@@ -1092,15 +1092,15 @@ fis_write(int argc, char *argv[])
     void *err_addr;
     struct option_info opts[3];
     bool prog_ok;
 
     init_opts(&opts[0], 'b', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&mem_addr, (bool *)&mem_addr_set, "memory base address");
+              (void *)&mem_addr, (bool *)&mem_addr_set, "memory base address");
     init_opts(&opts[1], 'f', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&flash_addr, (bool *)&flash_addr_set, "FLASH memory base address");
+              (void *)&flash_addr, (bool *)&flash_addr_set, "FLASH memory base address");
     init_opts(&opts[2], 'l', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&length, (bool *)&length_set, "image length [in FLASH]");
+              (void *)&length, (bool *)&length_set, "image length [in FLASH]");
     if (!scan_opts(argc, argv, 2, opts, 3, 0, 0, 0))
     {
         fis_usage("invalid arguments");
         return;
     }
@@ -1167,13 +1167,13 @@ fis_erase(int argc, char *argv[])
     bool length_set = false;
     void *err_addr;
     struct option_info opts[2];
 
     init_opts(&opts[0], 'f', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&flash_addr, (bool *)&flash_addr_set, "FLASH memory base address");
+              (void *)&flash_addr, (bool *)&flash_addr_set, "FLASH memory base address");
     init_opts(&opts[1], 'l', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&length, (bool *)&length_set, "length");
+              (void *)&length, (bool *)&length_set, "length");
     if (!scan_opts(argc, argv, 2, opts, 2, (void **)0, 0, ""))
     {
         fis_usage("invalid arguments");
         return;
     }
@@ -1216,13 +1216,13 @@ fis_lock(int argc, char *argv[])
     bool length_set = false;
     void *err_addr;
     struct option_info opts[2];
 
     init_opts(&opts[0], 'f', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&flash_addr, (bool *)&flash_addr_set, "FLASH memory base address");
+              (void *)&flash_addr, (bool *)&flash_addr_set, "FLASH memory base address");
     init_opts(&opts[1], 'l', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&length, (bool *)&length_set, "length");
+              (void *)&length, (bool *)&length_set, "length");
     if (!scan_opts(argc, argv, 2, opts, 2, (void **)&name, OPTION_ARG_TYPE_STR, "image name"))
     {
         fis_usage("invalid arguments");
         return;
     }
@@ -1263,13 +1263,13 @@ fis_unlock(int argc, char *argv[])
     bool length_set = false;
     void *err_addr;
     struct option_info opts[2];
 
     init_opts(&opts[0], 'f', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&flash_addr, (bool *)&flash_addr_set, "FLASH memory base address");
+              (void *)&flash_addr, (bool *)&flash_addr_set, "FLASH memory base address");
     init_opts(&opts[1], 'l', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&length, (bool *)&length_set, "length");
+              (void *)&length, (bool *)&length_set, "length");
     if (!scan_opts(argc, argv, 2, opts, 2, (void **)&name, OPTION_ARG_TYPE_STR, "image name"))
     {
         fis_usage("invalid arguments");
         return;
     }
Index: redboot/current/src/load.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/src/load.c,v
retrieving revision 1.38
diff -u -5 -p -r1.38 load.c
--- redboot/current/src/load.c	11 Feb 2004 13:40:53 -0000	1.38
+++ redboot/current/src/load.c	24 Feb 2004 13:38:26 -0000
@@ -611,31 +611,31 @@ do_load(int argc, char *argv[])
     host.sin_addr = my_bootp_info.bp_siaddr;
     host.sin_port = 0;
 #endif
 
     init_opts(&opts[0], 'v', false, OPTION_ARG_TYPE_FLG, 
-              (void **)&verbose, 0, "verbose");
+              (void *)&verbose, 0, "verbose");
     init_opts(&opts[1], 'r', false, OPTION_ARG_TYPE_FLG, 
-              (void **)&raw, 0, "load raw data");
+              (void *)&raw, 0, "load raw data");
     init_opts(&opts[2], 'b', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&base, (bool *)&base_addr_set, "load address");
+              (void *)&base, (bool *)&base_addr_set, "load address");
     init_opts(&opts[3], 'm', true, OPTION_ARG_TYPE_STR, 
-              (void **)&mode_str, (bool *)&mode_str_set, "download mode (TFTP, xyzMODEM, or disk)");
+              (void *)&mode_str, (bool *)&mode_str_set, "download mode (TFTP, xyzMODEM, or disk)");
     num_options = 4;
 #if CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS > 1
     init_opts(&opts[num_options], 'c', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&chan, (bool *)&chan_set, "I/O channel");
+              (void *)&chan, (bool *)&chan_set, "I/O channel");
     num_options++;
 #endif
 #ifdef CYGPKG_REDBOOT_NETWORKING
     init_opts(&opts[num_options], 'h', true, OPTION_ARG_TYPE_STR, 
-              (void **)&hostname, (bool *)&hostname_set, "host name or IP address");
+              (void *)&hostname, (bool *)&hostname_set, "host name or IP address");
     num_options++;
 #endif
 #ifdef CYGBLD_BUILD_REDBOOT_WITH_ZLIB
     init_opts(&opts[num_options], 'd', false, OPTION_ARG_TYPE_FLG, 
-              (void **)&decompress, 0, "decompress");
+              (void *)&decompress, 0, "decompress");
     num_options++;
 #endif
 
     if (!scan_opts(argc, argv, 1, opts, num_options, 
                    (void *)&filename, OPTION_ARG_TYPE_STR, "file name")) {
@@ -715,11 +715,11 @@ do_load(int argc, char *argv[])
 #endif
         }
         diag_printf("Using default protocol (%s)\n", which);
     }
 #ifdef CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS
-    if (base_addr_set && !valid_address(base)) {
+    if (base_addr_set && !valid_address((unsigned char *)base)) {
         if (!verify_action("Specified address (%p) is not believed to be in RAM", (void*)base))
             return;
         spillover_ok = true;
     }
 #endif
Index: redboot/current/src/main.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/src/main.c,v
retrieving revision 1.55
diff -u -5 -p -r1.55 main.c
--- redboot/current/src/main.c	19 Feb 2004 10:37:13 -0000	1.55
+++ redboot/current/src/main.c	24 Feb 2004 13:34:12 -0000
@@ -465,11 +465,11 @@ void
 do_help(int argc, char *argv[])
 {
     struct cmd *cmd;
     char *which = (char *)0;
 
-    if (!scan_opts(argc, argv, 1, 0, 0, (void **)&which, OPTION_ARG_TYPE_STR, "<topic>")) {
+    if (!scan_opts(argc, argv, 1, 0, 0, (void *)&which, OPTION_ARG_TYPE_STR, "<topic>")) {
         diag_printf("Invalid argument\n");
         return;
     }
     cmd = __RedBoot_CMD_TAB__;
     show_help(cmd, &__RedBoot_CMD_TAB_END__, which, "");
@@ -525,17 +525,17 @@ do_go(int argc, char *argv[])
     hal_virtual_comm_table_t *__chan;
 
     __mem_fault_handler = 0; // Let GDB handle any faults directly
     entry = entry_address;  // Default from last 'load' operation
     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', false, OPTION_ARG_TYPE_FLG, 
-              (void **)&cache_enabled, (bool *)0, "go with caches enabled");
+              (void *)&cache_enabled, (bool *)0, "go with caches enabled");
     num_options = 2;
 #ifdef CYGPKG_IO_ETH_DRIVERS
     init_opts(&opts[2], 'n', false, OPTION_ARG_TYPE_FLG, 
-              (void **)&stop_net, (bool *)0, "go with network driver stopped");
+              (void *)&stop_net, (bool *)0, "go with network driver stopped");
     num_options++;
 #endif
     if (!scan_opts(argc, argv, 1, opts, num_options, (void *)&entry, OPTION_ARG_TYPE_NUM, "starting address"))
     {
         return;
@@ -685,11 +685,11 @@ do_baud_rate(int argc, char *argv[])
 #ifdef CYGSEM_REDBOOT_FLASH_CONFIG
     struct config_option opt;
 #endif
 
     init_opts(&opts[0], 'b', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&new_rate, (bool *)&new_rate_set, "new baud rate");
+              (void *)&new_rate, (bool *)&new_rate_set, "new baud rate");
     if (!scan_opts(argc, argv, 1, opts, 1, 0, 0, "")) {
         return;
     }
     __chan = CYGACC_CALL_IF_CONSOLE_PROCS();
     if (new_rate_set) {
Index: redboot/current/src/mcmp.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/src/mcmp.c,v
retrieving revision 1.1
diff -u -5 -p -r1.1 mcmp.c
--- redboot/current/src/mcmp.c	6 Aug 2002 14:29:12 -0000	1.1
+++ redboot/current/src/mcmp.c	24 Feb 2004 13:34:12 -0000
@@ -70,21 +70,21 @@ do_mcmp(int argc, char *argv[])
     long len;
     bool src_base_set, dst_base_set, len_set;
     bool set_32bit, set_16bit, set_8bit;
 
     init_opts(&opts[0], 's', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&src_base, (bool *)&src_base_set, "base address");
+              (void *)&src_base, (bool *)&src_base_set, "base address");
     init_opts(&opts[1], 'l', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&len, (bool *)&len_set, "length");
+              (void *)&len, (bool *)&len_set, "length");
     init_opts(&opts[2], 'd', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&dst_base, (bool *)&dst_base_set, "base address");
+              (void *)&dst_base, (bool *)&dst_base_set, "base address");
     init_opts(&opts[3], '4', false, OPTION_ARG_TYPE_FLG,
               (void *)&set_32bit, (bool *)0, "fill 32 bit units");
     init_opts(&opts[4], '2', false, OPTION_ARG_TYPE_FLG,
-              (void **)&set_16bit, (bool *)0, "fill 16 bit units");
+              (void *)&set_16bit, (bool *)0, "fill 16 bit units");
     init_opts(&opts[5], '1', false, OPTION_ARG_TYPE_FLG,
-              (void **)&set_8bit, (bool *)0, "fill 8 bit units");
+              (void *)&set_8bit, (bool *)0, "fill 8 bit units");
     if (!scan_opts(argc, argv, 1, opts, 6, 0, 0, "")) {
         return;
     }
     if (!src_base_set || !dst_base_set || !len_set) {
         diag_printf("usage: mcmp -s <addr> -d <addr> -l <length> [-1|-2|-4]\n");
Index: redboot/current/src/mcopy.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/src/mcopy.c,v
retrieving revision 1.1
diff -u -5 -p -r1.1 mcopy.c
--- redboot/current/src/mcopy.c	1 Jul 2003 16:25:23 -0000	1.1
+++ redboot/current/src/mcopy.c	24 Feb 2004 13:34:12 -0000
@@ -62,21 +62,21 @@ do_mcopy(int argc, char *argv[])
     bool src_set, dst_set, len_set;
     bool sz32, sz16, sz8;
     int incr = 1;
 
     init_opts(&opts[0], 's', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&src, (bool *)&src_set, "base address");
+              (void *)&src, (bool *)&src_set, "base address");
     init_opts(&opts[1], 'l', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&len, (bool *)&len_set, "length");
+              (void *)&len, (bool *)&len_set, "length");
     init_opts(&opts[2], 'd', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&dst, (bool *)&dst_set, "base address");
+              (void *)&dst, (bool *)&dst_set, "base address");
     init_opts(&opts[3], '4', false, OPTION_ARG_TYPE_FLG,
               (void *)&sz32, (bool *)0, "copy 32 bit data");
     init_opts(&opts[4], '2', false, OPTION_ARG_TYPE_FLG,
-              (void **)&sz16, (bool *)0, "copy 16 bit data");
+              (void *)&sz16, (bool *)0, "copy 16 bit data");
     init_opts(&opts[5], '1', false, OPTION_ARG_TYPE_FLG,
-              (void **)&sz8, (bool *)0, "copy 8 bit data");
+              (void *)&sz8, (bool *)0, "copy 8 bit data");
     if (!scan_opts(argc, argv, 1, opts, 6, 0, 0, "")) {
         return;
     }
 
     // Must have src, dst, len. No more than one size specifier.
Index: redboot/current/src/mfill.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/src/mfill.c,v
retrieving revision 1.1
diff -u -5 -p -r1.1 mfill.c
--- redboot/current/src/mfill.c	6 Aug 2002 14:29:12 -0000	1.1
+++ redboot/current/src/mfill.c	24 Feb 2004 13:34:12 -0000
@@ -70,21 +70,21 @@ do_mfill(int argc, char *argv[])
     long len;
     bool base_set, len_set, pat_set;
     bool set_32bit, set_16bit, set_8bit;
 
     init_opts(&opts[0], 'b', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&base, (bool *)&base_set, "base address");
+              (void *)&base, (bool *)&base_set, "base address");
     init_opts(&opts[1], 'l', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&len, (bool *)&len_set, "length");
+              (void *)&len, (bool *)&len_set, "length");
     init_opts(&opts[2], 'p', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&pat, (bool *)&pat_set, "pattern");
+              (void *)&pat, (bool *)&pat_set, "pattern");
     init_opts(&opts[3], '4', false, OPTION_ARG_TYPE_FLG,
               (void *)&set_32bit, (bool *)0, "fill 32 bit units");
     init_opts(&opts[4], '2', false, OPTION_ARG_TYPE_FLG,
-              (void **)&set_16bit, (bool *)0, "fill 16 bit units");
+              (void *)&set_16bit, (bool *)0, "fill 16 bit units");
     init_opts(&opts[5], '1', false, OPTION_ARG_TYPE_FLG,
-              (void **)&set_8bit, (bool *)0, "fill 8 bit units");
+              (void *)&set_8bit, (bool *)0, "fill 8 bit units");
     if (!scan_opts(argc, argv, 1, opts, 6, 0, 0, "")) {
         return;
     }
     if (!base_set || !len_set) {
         diag_printf("usage: mfill -b <addr> -l <length> [-p <pattern>] [-1|-2|-4]\n");
Index: redboot/current/src/net/net_io.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/src/net/net_io.c,v
retrieving revision 1.37
diff -u -5 -p -r1.37 net_io.c
--- redboot/current/src/net/net_io.c	9 Oct 2003 20:23:36 -0000	1.37
+++ redboot/current/src/net/net_io.c	24 Feb 2004 13:34:12 -0000
@@ -761,11 +761,11 @@ net_init(void)
     }
     if (have_net) {
         show_eth_info();
 
 #ifdef CYGSEM_REDBOOT_FLASH_CONFIG
-        flash_get_IP("bootp_server_ip", &my_bootp_info.bp_siaddr);
+        flash_get_IP("bootp_server_ip", (ip_addr_t *)&my_bootp_info.bp_siaddr);
 #endif
 #ifdef CYGPKG_REDBOOT_NETWORKING_DNS
 	redboot_dns_res_init();
 #endif
         show_addrs();
@@ -795,17 +795,17 @@ do_ip_addr(int argc, char *argv[])
     bool dns_addr_set;
 #endif
     int num_opts;
 
     init_opts(&opts[0], 'l', true, OPTION_ARG_TYPE_STR, 
-              (void **)&ip_addr, (bool *)&ip_addr_set, "local IP address");
+              (void *)&ip_addr, (bool *)&ip_addr_set, "local IP address");
     init_opts(&opts[1], 'h', true, OPTION_ARG_TYPE_STR, 
-              (void **)&host_addr, (bool *)&host_addr_set, "default server address");
+              (void *)&host_addr, (bool *)&host_addr_set, "default server address");
     num_opts = 2;
 #ifdef CYGPKG_REDBOOT_NETWORKING_DNS
     init_opts(&opts[2], 'd', true, OPTION_ARG_TYPE_STR, 
-              (void **)&dns_addr, (bool *)&dns_addr_set, "DNS server address");
+              (void *)&dns_addr, (bool *)&dns_addr_set, "DNS server address");
     num_opts++;
 #endif
     if (!scan_opts(argc, argv, 1, opts, num_opts, 0, 0, "")) {
         return;
     }
Index: redboot/current/src/net/ping.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/src/net/ping.c,v
retrieving revision 1.11
diff -u -5 -p -r1.11 ping.c
--- redboot/current/src/net/ping.c	16 Jul 2003 19:08:54 -0000	1.11
+++ redboot/current/src/net/ping.c	24 Feb 2004 13:34:12 -0000
@@ -108,23 +108,23 @@ do_ping(int argc, char *argv[])
     ip_header_t *ip;
     unsigned short cksum;
     ip_route_t dest_ip;
 
     init_opts(&opts[0], 'n', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&count, (bool *)&count_set, "<count> - number of packets to test");
+              (void *)&count, (bool *)&count_set, "<count> - number of packets to test");
     init_opts(&opts[1], 't', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&timeout, (bool *)&timeout_set, "<timeout> - max #ms per packet [rount trip]");
+              (void *)&timeout, (bool *)&timeout_set, "<timeout> - max #ms per packet [rount trip]");
     init_opts(&opts[2], 'i', true, OPTION_ARG_TYPE_STR, 
-              (void **)&local_ip_addr, (bool *)&local_ip_addr_set, "local IP address");
+              (void *)&local_ip_addr, (bool *)&local_ip_addr_set, "local IP address");
     init_opts(&opts[3], 'h', true, OPTION_ARG_TYPE_STR, 
-              (void **)&host_ip_addr, (bool *)&host_ip_addr_set, "host name or IP address");
+              (void *)&host_ip_addr, (bool *)&host_ip_addr_set, "host name or IP address");
     init_opts(&opts[4], 'l', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&length, (bool *)&length_set, "<length> - size of payload");
+              (void *)&length, (bool *)&length_set, "<length> - size of payload");
     init_opts(&opts[5], 'v', false, OPTION_ARG_TYPE_FLG, 
-              (void **)&verbose, (bool *)0, "verbose operation");
+              (void *)&verbose, (bool *)0, "verbose operation");
     init_opts(&opts[6], 'r', true, OPTION_ARG_TYPE_NUM, 
-              (void **)&rate, (bool *)&rate_set, "<rate> - time between packets");
+              (void *)&rate, (bool *)&rate_set, "<rate> - time between packets");
     if (!scan_opts(argc, argv, 1, opts, 7, (void **)0, 0, "")) {
         diag_printf("PING - Invalid option specified\n");
         return;
     }   
     // Set defaults; this has to be done _after_ the scan, since it will

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]