aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-07-17 23:04:22 +0200
committerPetr Štetiar <ynezz@true.cz>2019-07-17 23:06:02 +0200
commitd6198d8625310cd1ad22113f137e48261fcc8ff6 (patch)
treea1976f242f46daaebf5392edd5336d5582ffb75e /package
parentbc18c2bfe7a80630eea15aa71800b0829ce32634 (diff)
downloadupstream-d6198d8625310cd1ad22113f137e48261fcc8ff6.tar.gz
upstream-d6198d8625310cd1ad22113f137e48261fcc8ff6.tar.bz2
upstream-d6198d8625310cd1ad22113f137e48261fcc8ff6.zip
mtd: cleanup unused code and variables in fis.c
While compile checking mtd changes in PR#1359 I've noticed following compiler warnings and cleaned them up: fis.c: In function 'fis_remap': fis.c:143:25: warning: variable 'redboot' set but not used [-Wunused-but-set-variable] struct fis_image_desc *redboot = NULL; ^~~~~~~ fis.c:142:25: warning: variable 'fisdir' set but not used [-Wunused-but-set-variable] struct fis_image_desc *fisdir = NULL; ^~~~~~ Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'package')
-rw-r--r--package/system/mtd/src/fis.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/package/system/mtd/src/fis.c b/package/system/mtd/src/fis.c
index e314c10258..8bde9af6dc 100644
--- a/package/system/mtd/src/fis.c
+++ b/package/system/mtd/src/fis.c
@@ -139,8 +139,6 @@ done:
int
fis_remap(struct fis_part *old, int n_old, struct fis_part *new, int n_new)
{
- struct fis_image_desc *fisdir = NULL;
- struct fis_image_desc *redboot = NULL;
struct fis_image_desc *first = NULL;
struct fis_image_desc *last = NULL;
struct fis_image_desc *first_fb = NULL;
@@ -164,12 +162,6 @@ fis_remap(struct fis_part *old, int n_old, struct fis_part *new, int n_new)
if (!desc->hdr.name[0] || (desc->hdr.name[0] == 0xff))
break;
- if (!strcmp((char *) desc->hdr.name, "FIS directory"))
- fisdir = desc;
-
- if (!strcmp((char *) desc->hdr.name, "RedBoot"))
- redboot = desc;
-
/* update max offset */
if (offset < desc->hdr.flash_base)
offset = desc->hdr.flash_base;
@@ -210,18 +202,6 @@ fis_remap(struct fis_part *old, int n_old, struct fis_part *new, int n_new)
size = offset - first_fb->hdr.flash_base;
-#ifdef notyet
- desc = first - 1;
- if (redboot && (desc >= redboot)) {
- if (first->hdr.flash_base - desc->hdr.size > desc->hdr.flash_base) {
- int delta = first->hdr.flash_base - desc->hdr.size - desc->hdr.flash_base;
-
- offset -= delta;
- size += delta;
- }
- }
-#endif
-
last++;
desc = first + n_new;
offset = first_fb->hdr.flash_base;