From 11f158d5340d16040b2bead51c6ac93c3e0c81f0 Mon Sep 17 00:00:00 2001 From: sjas Date: Sat, 12 Mar 2016 12:28:46 +0100 Subject: [PATCH 1/6] Update Makefile Don't treat warnings as errors, so the codebase will build. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 30253c3..2d5d806 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ pkgconfig_dir = $(libdir)/pkgconfig DEFS = -DVERSION_MAJOR=$(VERSION_MAJOR)\ -DVERSION_MINOR=$(VERSION_MINOR) -CFLAGS += -O2 -Wall -Werror -Wno-unused-parameter -Ilib/ $(DEFS) +CFLAGS += -O2 -Wall -Wno-unused-parameter -Ilib/ $(DEFS) CFLAGS_GCOV := -fprofile-arcs -ftest-coverage -lgcov LINKOPTS = From bf8a24c519340b53348a4f23849cf5fabd45ef26 Mon Sep 17 00:00:00 2001 From: sjas Date: Sat, 12 Mar 2016 12:38:39 +0100 Subject: [PATCH 2/6] Create README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..0d875ca --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# flashmap +Automatically exported from code.google.com/p/flashmap + +Added the pending pull request over at the main github site since noone else seems to bother. + +# install (debian) + + make clean && make && checkinstall + +# uninstall (debian) + + dpkg -r flashmap From 9fc9eccd5010bd371dca2f592d78ce187f3e6b19 Mon Sep 17 00:00:00 2001 From: sjas Date: Sat, 12 Mar 2016 12:39:19 +0100 Subject: [PATCH 3/6] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 0d875ca..0c3e35c 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,10 @@ Automatically exported from code.google.com/p/flashmap Added the pending pull request over at the main github site since noone else seems to bother. +# prerequisites (debian-based distros) + + apt-get install checkinstall -y + # install (debian) make clean && make && checkinstall From 489510ab1d6b3f5e475d87e47e19be871013db38 Mon Sep 17 00:00:00 2001 From: sjas Date: Sat, 12 Mar 2016 12:40:49 +0100 Subject: [PATCH 4/6] Update Makefile make build fail on warnings again --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2d5d806..30253c3 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ pkgconfig_dir = $(libdir)/pkgconfig DEFS = -DVERSION_MAJOR=$(VERSION_MAJOR)\ -DVERSION_MINOR=$(VERSION_MINOR) -CFLAGS += -O2 -Wall -Wno-unused-parameter -Ilib/ $(DEFS) +CFLAGS += -O2 -Wall -Werror -Wno-unused-parameter -Ilib/ $(DEFS) CFLAGS_GCOV := -fprofile-arcs -ftest-coverage -lgcov LINKOPTS = From a0f55fd61ae1f1128fc37cd17d3cb6e36a030349 Mon Sep 17 00:00:00 2001 From: sjas Date: Sat, 12 Mar 2016 12:41:57 +0100 Subject: [PATCH 5/6] Update fmap_csum.c fix warning which made the build fail prior --- fmap_csum.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fmap_csum.c b/fmap_csum.c index c443a62..a46fc8f 100644 --- a/fmap_csum.c +++ b/fmap_csum.c @@ -58,9 +58,10 @@ void print_csum(uint8_t *digest, size_t len) char *str; char tmp[3]; unsigned int i; + char size = sizeof(str); str = malloc((len * 2) + 1); - memset(str, '\0', sizeof(str)); + memset(str, '\0', size); for (i = 0; i < len; i++) { snprintf(tmp, 3, "%02x", digest[i]); strncat(str, tmp, 3); From 45c4a4e09300b0b84e425bee3dade124c02f77a0 Mon Sep 17 00:00:00 2001 From: sjas Date: Sat, 12 Mar 2016 12:42:37 +0100 Subject: [PATCH 6/6] Update fmap.c --- lib/fmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fmap.c b/lib/fmap.c index 8850a92..5022434 100644 --- a/lib/fmap.c +++ b/lib/fmap.c @@ -223,7 +223,7 @@ int fmap_get_csum(const uint8_t *image, unsigned int image_len, uint8_t **digest int fmap_offset; SHA_CTX ctx; - if ((image == NULL)) + if (image == NULL) return -1; if ((fmap_offset = fmap_find(image, image_len)) < 0)