firmware-utils: fix -Wpointer-sign warnings
[openwrt/openwrt.git] / tools / firmware-utils / src / mkmylofw.c
index c049ce436e2ec36f1e3e5144dc1992d26cbd1ac9..5722365ee3bd605adef495b52c154b47a632b4d0 100644 (file)
@@ -478,18 +478,20 @@ process_partitions(void)
  * routines to write data to the output file
  */
 int
-write_out_data(FILE *outfile, uint8_t *data, size_t len, uint32_t *crc)
+write_out_data(FILE *outfile, void *data, size_t len, uint32_t *crc)
 {
+       uint8_t *ptr = data;
+
        errno = 0;
 
-       fwrite(data, len, 1, outfile);
+       fwrite(ptr, len, 1, outfile);
        if (errno) {
                errmsg(1,"unable to write output file");
                return -1;
        }
 
        if (crc) {
-               update_crc(data, len, crc);
+               update_crc(ptr, len, crc);
        }
 
        return 0;