]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
Change section_start pointer to char** to prevent aliasing warnings on old toolchain
authorhenryk@ploetzli.ch <henryk@ploetzli.ch@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Tue, 8 Sep 2009 00:37:13 +0000 (00:37 +0000)
committerhenryk@ploetzli.ch <henryk@ploetzli.ch@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Tue, 8 Sep 2009 00:37:13 +0000 (00:37 +0000)
armsrc/fpgaloader.c

index 86a7a405bda53009cb94d6cd2891e8a0f018df47..8cea61b0b7005fd51e116a0c43a7d82c964b9eb0 100644 (file)
@@ -218,7 +218,7 @@ static int bitparse_init(void * start_address, void *end_address)
        }\r
 }\r
 \r
        }\r
 }\r
 \r
-int bitparse_find_section(char section_name, void **section_start, unsigned int *section_length)\r
+int bitparse_find_section(char section_name, char **section_start, unsigned int *section_length)\r
 {\r
        char *pos = bitparse_headers_start;\r
        int result = 0;\r
 {\r
        char *pos = bitparse_headers_start;\r
        int result = 0;\r
@@ -275,7 +275,7 @@ void FpgaDownloadAndGo(void)
                /* Successfully initialized the .bit parser. Find the 'e' section and\r
                 * send its contents to the FPGA.
                 */\r
                /* Successfully initialized the .bit parser. Find the 'e' section and\r
                 * send its contents to the FPGA.
                 */\r
-               void *bitstream_start;\r
+               char *bitstream_start;\r
                unsigned int bitstream_length;\r
                if(bitparse_find_section('e', &bitstream_start, &bitstream_length)) {\r
                        DownloadFPGA(bitstream_start, bitstream_length, 0);\r
                unsigned int bitstream_length;\r
                if(bitparse_find_section('e', &bitstream_start, &bitstream_length)) {\r
                        DownloadFPGA(bitstream_start, bitstream_length, 0);\r
@@ -300,26 +300,26 @@ void FpgaGatherVersion(char *dst, int len)
        char *fpga_info; \r
        unsigned int fpga_info_len;\r
        dst[0] = 0;\r
        char *fpga_info; \r
        unsigned int fpga_info_len;\r
        dst[0] = 0;\r
-       if(!bitparse_find_section('e', (void**)&fpga_info, &fpga_info_len)) {\r
+       if(!bitparse_find_section('e', &fpga_info, &fpga_info_len)) {\r
                strncat(dst, "FPGA image: legacy image without version information", len-1);\r
        } else {\r
                strncat(dst, "FPGA image built", len-1);\r
                /* USB packets only have 48 bytes data payload, so be terse */\r
 #if 0\r
                strncat(dst, "FPGA image: legacy image without version information", len-1);\r
        } else {\r
                strncat(dst, "FPGA image built", len-1);\r
                /* USB packets only have 48 bytes data payload, so be terse */\r
 #if 0\r
-               if(bitparse_find_section('a', (void**)&fpga_info, &fpga_info_len) && fpga_info[fpga_info_len-1] == 0 ) {\r
+               if(bitparse_find_section('a', &fpga_info, &fpga_info_len) && fpga_info[fpga_info_len-1] == 0 ) {\r
                        strncat(dst, " from ", len-1);\r
                        strncat(dst, fpga_info, len-1);\r
                }\r
                        strncat(dst, " from ", len-1);\r
                        strncat(dst, fpga_info, len-1);\r
                }\r
-               if(bitparse_find_section('b', (void**)&fpga_info, &fpga_info_len) && fpga_info[fpga_info_len-1] == 0 ) {\r
+               if(bitparse_find_section('b', &fpga_info, &fpga_info_len) && fpga_info[fpga_info_len-1] == 0 ) {\r
                        strncat(dst, " for ", len-1);\r
                        strncat(dst, fpga_info, len-1);\r
                }\r
 #endif\r
                        strncat(dst, " for ", len-1);\r
                        strncat(dst, fpga_info, len-1);\r
                }\r
 #endif\r
-               if(bitparse_find_section('c', (void**)&fpga_info, &fpga_info_len) && fpga_info[fpga_info_len-1] == 0 ) {\r
+               if(bitparse_find_section('c', &fpga_info, &fpga_info_len) && fpga_info[fpga_info_len-1] == 0 ) {\r
                        strncat(dst, " on ", len-1);\r
                        strncat(dst, fpga_info, len-1);\r
                }\r
                        strncat(dst, " on ", len-1);\r
                        strncat(dst, fpga_info, len-1);\r
                }\r
-               if(bitparse_find_section('d', (void**)&fpga_info, &fpga_info_len) && fpga_info[fpga_info_len-1] == 0 ) {\r
+               if(bitparse_find_section('d', &fpga_info, &fpga_info_len) && fpga_info[fpga_info_len-1] == 0 ) {\r
                        strncat(dst, " at ", len-1);\r
                        strncat(dst, fpga_info, len-1);\r
                }\r
                        strncat(dst, " at ", len-1);\r
                        strncat(dst, fpga_info, len-1);\r
                }\r
Impressum, Datenschutz