Mercurial > flash_v2
changeset 1513:c4355f101bf6
Cleanups to remove warnings
| author | gthomas |
|---|---|
| date | Tue, 24 Feb 2004 14:15:14 +0000 |
| parents | 489f52f54b1c |
| children | e14a7321a363 |
| files | packages/redboot/current/ChangeLog packages/redboot/current/src/cksum.c packages/redboot/current/src/dump.c packages/redboot/current/src/fconfig.c packages/redboot/current/src/flash.c packages/redboot/current/src/load.c packages/redboot/current/src/main.c packages/redboot/current/src/mcmp.c packages/redboot/current/src/mcopy.c packages/redboot/current/src/mfill.c packages/redboot/current/src/net/net_io.c packages/redboot/current/src/net/ping.c |
| diffstat | 12 files changed, 105 insertions(+), 81 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/redboot/current/ChangeLog +++ b/packages/redboot/current/ChangeLog @@ -1,3 +1,17 @@ +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
--- a/packages/redboot/current/src/cksum.c +++ b/packages/redboot/current/src/cksum.c @@ -71,9 +71,9 @@ do_cksum(int argc, char *argv[]) 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; }
--- a/packages/redboot/current/src/dump.c +++ b/packages/redboot/current/src/dump.c @@ -79,17 +79,17 @@ do_dump(int argc, char *argv[]) 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; }
--- a/packages/redboot/current/src/fconfig.c +++ b/packages/redboot/current/src/fconfig.c @@ -60,6 +60,7 @@ #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 @@ -71,6 +72,11 @@ externC void read_eeprom(void *buf, int 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) @@ -466,15 +472,15 @@ do_flash_config(int argc, char *argv[]) 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 @@ -684,8 +690,10 @@ void flash_write_config(bool prompt) { #if defined(CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_FLASH) + void *err_addr; +#if !defined(CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG) int stat; - void *err_addr; +#endif #endif config->len = sizeof(struct _config); @@ -695,9 +703,9 @@ flash_write_config(bool prompt) 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); @@ -715,8 +723,8 @@ flash_write_config(bool prompt) // 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 } @@ -1028,8 +1036,10 @@ static void load_flash_config(void) { bool use_boot_script; + unsigned char *cfg_temp = (unsigned char *)workspace_end; +#ifdef CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA_FLASH void *err_addr; - unsigned char *cfg_temp = (unsigned char *)workspace_end; +#endif config_ok = false; script = (unsigned char *)0;
--- a/packages/redboot/current/src/flash.c +++ b/packages/redboot/current/src/flash.c @@ -249,7 +249,7 @@ fis_init(int argc, char *argv[]) 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; @@ -459,10 +459,10 @@ fis_list(int argc, char *argv[]) #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; @@ -705,19 +705,19 @@ fis_create(int argc, char *argv[]) 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"); @@ -920,7 +920,7 @@ fis_delete(int argc, char *argv[]) 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; @@ -992,17 +992,17 @@ fis_load(int argc, char *argv[]) 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; @@ -1094,11 +1094,11 @@ fis_write(int argc, char *argv[]) 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"); @@ -1169,9 +1169,9 @@ fis_erase(int argc, char *argv[]) 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"); @@ -1218,9 +1218,9 @@ fis_lock(int argc, char *argv[]) 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"); @@ -1265,9 +1265,9 @@ fis_unlock(int argc, char *argv[]) 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");
--- a/packages/redboot/current/src/load.c +++ b/packages/redboot/current/src/load.c @@ -613,27 +613,27 @@ do_load(int argc, char *argv[]) #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 @@ -717,7 +717,7 @@ do_load(int argc, char *argv[]) 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;
--- a/packages/redboot/current/src/main.c +++ b/packages/redboot/current/src/main.c @@ -467,7 +467,7 @@ 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; } @@ -527,13 +527,13 @@ do_go(int argc, char *argv[]) __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")) @@ -687,7 +687,7 @@ do_baud_rate(int argc, char *argv[]) #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; }
--- a/packages/redboot/current/src/mcmp.c +++ b/packages/redboot/current/src/mcmp.c @@ -72,17 +72,17 @@ do_mcmp(int argc, char *argv[]) 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; }
--- a/packages/redboot/current/src/mcopy.c +++ b/packages/redboot/current/src/mcopy.c @@ -64,17 +64,17 @@ do_mcopy(int argc, char *argv[]) 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; }
--- a/packages/redboot/current/src/mfill.c +++ b/packages/redboot/current/src/mfill.c @@ -72,17 +72,17 @@ do_mfill(int argc, char *argv[]) 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; }
--- a/packages/redboot/current/src/net/net_io.c +++ b/packages/redboot/current/src/net/net_io.c @@ -763,7 +763,7 @@ net_init(void) 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(); @@ -797,13 +797,13 @@ do_ip_addr(int argc, char *argv[]) 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, "")) {
--- a/packages/redboot/current/src/net/ping.c +++ b/packages/redboot/current/src/net/ping.c @@ -110,19 +110,19 @@ do_ping(int argc, char *argv[]) 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;
