summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-12-11 15:09:30 +0000
committerJohn Crispin <john@openwrt.org>2015-12-11 15:09:30 +0000
commit244173a09392e3b9beb02305e4b4036572044f21 (patch)
tree1112c4ccc1f57aa3473681c6a13da044e96cbc9b
parent0231d4135284dec47ec6597cf938698c6117ef1a (diff)
downloadmtk-20170518-244173a09392e3b9beb02305e4b4036572044f21.zip
mtk-20170518-244173a09392e3b9beb02305e4b4036572044f21.tar.gz
mtk-20170518-244173a09392e3b9beb02305e4b4036572044f21.tar.bz2
firmware-utils: fix various compiler warnings
mostly implicit defines due to missing includes plus one const that shouldn't be one. Signed-off-by: Felix Kaechele <felix@kaechele.ca> SVN-Revision: 47865
-rw-r--r--tools/firmware-utils/src/dgfirmware.c1
-rw-r--r--tools/firmware-utils/src/lzma2eva.c2
-rw-r--r--tools/firmware-utils/src/mkhilinkfw.c1
-rw-r--r--tools/firmware-utils/src/spw303v.c1
-rw-r--r--tools/firmware-utils/src/srec2bin.c2
-rw-r--r--tools/firmware-utils/src/wrt400n.c2
-rw-r--r--tools/firmware-utils/src/zyxbcm.c1
7 files changed, 8 insertions, 2 deletions
diff --git a/tools/firmware-utils/src/dgfirmware.c b/tools/firmware-utils/src/dgfirmware.c
index 5ff3b69..e3257f1 100644
--- a/tools/firmware-utils/src/dgfirmware.c
+++ b/tools/firmware-utils/src/dgfirmware.c
@@ -1,5 +1,6 @@
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#define IMG_SIZE 0x3e0000
diff --git a/tools/firmware-utils/src/lzma2eva.c b/tools/firmware-utils/src/lzma2eva.c
index 0bc13fa..1d7e364 100644
--- a/tools/firmware-utils/src/lzma2eva.c
+++ b/tools/firmware-utils/src/lzma2eva.c
@@ -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;
diff --git a/tools/firmware-utils/src/mkhilinkfw.c b/tools/firmware-utils/src/mkhilinkfw.c
index 99322d4..55908e5 100644
--- a/tools/firmware-utils/src/mkhilinkfw.c
+++ b/tools/firmware-utils/src/mkhilinkfw.c
@@ -22,6 +22,7 @@
* gcc -lcrypto hlkcrypt.c -o hlkcrypt
*/
+#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
diff --git a/tools/firmware-utils/src/spw303v.c b/tools/firmware-utils/src/spw303v.c
index ae34a1e..654d68d 100644
--- a/tools/firmware-utils/src/spw303v.c
+++ b/tools/firmware-utils/src/spw303v.c
@@ -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>
diff --git a/tools/firmware-utils/src/srec2bin.c b/tools/firmware-utils/src/srec2bin.c
index 1cffbae..5cc71bd 100644
--- a/tools/firmware-utils/src/srec2bin.c
+++ b/tools/firmware-utils/src/srec2bin.c
@@ -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;
diff --git a/tools/firmware-utils/src/wrt400n.c b/tools/firmware-utils/src/wrt400n.c
index a9a4908..1cf1deb 100644
--- a/tools/firmware-utils/src/wrt400n.c
+++ b/tools/firmware-utils/src/wrt400n.c
@@ -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"
diff --git a/tools/firmware-utils/src/zyxbcm.c b/tools/firmware-utils/src/zyxbcm.c
index cfd00d3..ffeb7cc 100644
--- a/tools/firmware-utils/src/zyxbcm.c
+++ b/tools/firmware-utils/src/zyxbcm.c
@@ -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>