diff options
author | Roland Hieber <r.hieber@pengutronix.de> | 2018-06-13 14:20:45 +0200 |
---|---|---|
committer | Roland Hieber <r.hieber@pengutronix.de> | 2018-06-13 16:28:16 +0200 |
commit | 3235f6cfbfe06064a53a53f913bfee3ebb433df8 (patch) | |
tree | 2856208d08d17388ee1b4a86ed1ad2080fec36d0 | |
parent | 0ba29e9ce179eda8adfbfba6189e0cdf3804b23e (diff) | |
download | barebox-3235f6cfbfe06064a53a53f913bfee3ebb433df8.tar.gz barebox-3235f6cfbfe06064a53a53f913bfee3ebb433df8.tar.xz |
debian: omap3-usb-loader: fix compiler warning
Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
-rw-r--r-- | debian/patches/0005-scripts-omap3-usb-loader-fix-compiler-warning.patch | 38 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 39 insertions, 0 deletions
diff --git a/debian/patches/0005-scripts-omap3-usb-loader-fix-compiler-warning.patch b/debian/patches/0005-scripts-omap3-usb-loader-fix-compiler-warning.patch new file mode 100644 index 0000000000..91c29aa56e --- /dev/null +++ b/debian/patches/0005-scripts-omap3-usb-loader-fix-compiler-warning.patch @@ -0,0 +1,38 @@ +From: Sascha Hauer <s.hauer@pengutronix.de> +Date: Mon, 11 Jun 2018 09:06:28 +0200 +Subject: scripts: omap3-usb-loader: fix compiler warning + +Compiling omap3-usb-loader issues the warning: + +warning: self-comparison always evaluates to true [-Wtautological-compare] + +Just remove the bogus test. + +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +Origin: https://git.pengutronix.de/cgit/barebox/commit/?h=next&id=23ee83f42f +Applied-Upstream: commit:23ee83f42f +--- + scripts/omap3-usb-loader.c | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git a/scripts/omap3-usb-loader.c b/scripts/omap3-usb-loader.c +index edf6043..3ba9af0 100644 +--- a/scripts/omap3-usb-loader.c ++++ b/scripts/omap3-usb-loader.c +@@ -354,12 +354,10 @@ static unsigned char *read_file(char *path, size_t *readamt) + size_t iter = 0; + + while (1) { +- if (iter >= iter) { +- allocsize += 1024; +- data = realloc(data, allocsize); +- if (!data) +- return NULL; +- } ++ allocsize += 1024; ++ data = realloc(data, allocsize); ++ if (!data) ++ return NULL; + + size_t readsize = allocsize - iter; + size_t ret = fread(data + iter, sizeof (unsigned char), readsize, fp); diff --git a/debian/patches/series b/debian/patches/series index 92a1a3ac3b..ea608c44c2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ 0002-imx-usb-loader-Fix-verify-for-non-word-aligned-lengt.patch 0003-imx-usb-loader-dump-memory-bytewise-on-verification-.patch 0004-scripts-create-a-separate-section-for-host-tools.patch +0005-scripts-omap3-usb-loader-fix-compiler-warning.patch |