firmware-utils: fix various compiler warnings
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 11 Dec 2015 15:09:30 +0000 (15:09 +0000)
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 11 Dec 2015 15:09:30 +0000 (15:09 +0000)
mostly implicit defines due to missing includes plus one const that
shouldn't be one.

Signed-off-by: Felix Kaechele <felix@kaechele.ca>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47865 3c298f89-4303-0410-b956-a3cf2f4a3e73

tools/firmware-utils/src/dgfirmware.c
tools/firmware-utils/src/lzma2eva.c
tools/firmware-utils/src/mkhilinkfw.c
tools/firmware-utils/src/spw303v.c
tools/firmware-utils/src/srec2bin.c
tools/firmware-utils/src/wrt400n.c
tools/firmware-utils/src/zyxbcm.c

index 5ff3b69..e3257f1 100644 (file)
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 
 
 #define IMG_SIZE     0x3e0000
index 0bc13fa..1d7e364 100644 (file)
@@ -48,7 +48,7 @@ main(int argc, char *argv[])
 
   const char *infile, *outfile;
   FILE *in, *out;
-  static const uint8_t buf[4096];
+  static uint8_t buf[4096];
   size_t elems;
 
   uint8_t properties;
index 99322d4..55908e5 100644 (file)
@@ -22,6 +22,7 @@
  *   gcc -lcrypto hlkcrypt.c -o hlkcrypt
  */
  
+#include <arpa/inet.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <getopt.h>
index ae34a1e..654d68d 100644 (file)
@@ -18,6 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
 
+#include <arpa/inet.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 1cffbae..5cc71bd 100644 (file)
@@ -513,7 +513,7 @@ int srec2bin(int argc,char *argv[],int verbose)
     return(1);
 }
 
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
     debug = TRUE;
     debug = FALSE;
index a9a4908..1cf1deb 100644 (file)
@@ -7,12 +7,14 @@
  *
  *     Author: Sandeep Mistry
  */
+#include <arpa/inet.h>
 #include <fcntl.h>
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <unistd.h>
 
 #include "cyg_crc.h"
 
index cfd00d3..ffeb7cc 100644 (file)
@@ -18,6 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
 
+#include <arpa/inet.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>