summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-01-26 12:40:48 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-01-27 14:24:10 +0100
commita01e54d2015ea692e96f8909b3b1a75e0443445e (patch)
treec2313760cfa75a6bfb17f9524b78289847912fd1 /common
parentea53e1b5724d78bc6e5cf49d48bf33bdef74faa5 (diff)
downloadbarebox-a01e54d2015ea692e96f8909b3b1a75e0443445e.tar.gz
treewide: fix format specifiers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/environment.c10
-rw-r--r--common/hush.c4
-rw-r--r--common/module.c2
-rw-r--r--common/parser.c4
-rw-r--r--common/resource.c26
-rw-r--r--common/uimage.c5
6 files changed, 31 insertions, 20 deletions
diff --git a/common/environment.c b/common/environment.c
index e11cd9d..379e76e 100644
--- a/common/environment.c
+++ b/common/environment.c
@@ -106,11 +106,13 @@ int file_save_action(const char *filename, struct stat *statbuf,
memcpy(data->writep, path, len);
inode->size = ENVFS_32(len);
data->writep += PAD4(len);
- debug("handling symlink %s size %ld namelen %d headerlen %d\n", filename + strlen(data->base),
- len, namelen, ENVFS_32(inode->headerlen));
+ debug("handling symlink %s size %d namelen %d headerlen %d\n",
+ filename + strlen(data->base),
+ len, namelen, ENVFS_32(inode->headerlen));
} else {
- debug("handling file %s size %ld namelen %d headerlen %d\n", filename + strlen(data->base),
- statbuf->st_size, namelen, ENVFS_32(inode->headerlen));
+ debug("handling file %s size %lld namelen %d headerlen %d\n",
+ filename + strlen(data->base),
+ statbuf->st_size, namelen, ENVFS_32(inode->headerlen));
inode->size = ENVFS_32(statbuf->st_size);
fd = open(filename, O_RDONLY);
diff --git a/common/hush.c b/common/hush.c
index f9e6411..1f468f6 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -937,14 +937,12 @@ static int run_list_real(struct p_context *ctx, struct pipe *pi)
return rcode;
}
-#ifdef DEBUG
/* broken, of course, but OK for testing */
-static char *indenter(int i)
+static __maybe_unused char *indenter(int i)
{
static char blanks[] = " ";
return &blanks[sizeof(blanks) - i - 1];
}
-#endif
/* return code is the exit status of the pipe */
static int free_pipe(struct pipe *pi, int indent)
diff --git a/common/module.c b/common/module.c
index 4cb8ef3..109fe5c 100644
--- a/common/module.c
+++ b/common/module.c
@@ -104,7 +104,7 @@ static int simplify_symbols(Elf32_Shdr *sechdrs,
sym[i].st_value
= resolve_symbol(sechdrs,
strtab + sym[i].st_name);
- debug("undef : %20s 0x%08x 0x%08lx\n", strtab + sym[i].st_name, sym[i].st_value);
+ debug("undef : %20s 0x%08x\n", strtab + sym[i].st_name, sym[i].st_value);
/* Ok if resolved. */
if (sym[i].st_value != 0)
diff --git a/common/parser.c b/common/parser.c
index fd578c7..4d993df 100644
--- a/common/parser.c
+++ b/common/parser.c
@@ -58,9 +58,7 @@ static void process_macros (const char *input, char *output)
/* 1 = waiting for '(' or '{' */
/* 2 = waiting for ')' or '}' */
/* 3 = waiting for ''' */
-#ifdef DEBUG
- char *output_start = output;
-#endif
+ char __maybe_unused *output_start = output;
pr_debug("[PROCESS_MACROS] INPUT len %d: \"%s\"\n", strlen (input),
input);
diff --git a/common/resource.c b/common/resource.c
index ea6abe8..5795e79 100644
--- a/common/resource.c
+++ b/common/resource.c
@@ -43,15 +43,21 @@ struct resource *request_region(struct resource *parent,
struct resource *r, *new;
if (end < start) {
- debug("%s: request region 0x%08x:0x%08x: end < start\n",
- __func__, start, end);
+ debug("%s: request region 0x%08llx:0x%08llx: end < start\n",
+ __func__,
+ (unsigned long long)start,
+ (unsigned long long)end);
return NULL;
}
/* outside parent resource? */
if (start < parent->start || end > parent->end) {
- debug("%s: 0x%08x:0x%08x outside parent resource 0x%08x:0x%08x\n",
- __func__, start, end, parent->start, parent->end);
+ debug("%s: 0x%08llx:0x%08llx outside parent resource 0x%08llx:0x%08llx\n",
+ __func__,
+ (unsigned long long)start,
+ (unsigned long long)end,
+ (unsigned long long)parent->start,
+ (unsigned long long)parent->end);
return NULL;
}
@@ -64,13 +70,19 @@ struct resource *request_region(struct resource *parent,
goto ok;
if (start > r->end)
continue;
- debug("%s: 0x%08x:0x%08x conflicts with 0x%08x:0x%08x\n",
- __func__, start, end, r->start, r->end);
+ debug("%s: 0x%08llx:0x%08llx conflicts with 0x%08llx:0x%08llx\n",
+ __func__,
+ (unsigned long long)start,
+ (unsigned long long)end,
+ (unsigned long long)r->start,
+ (unsigned long long)r->end);
return NULL;
}
ok:
- debug("%s ok: 0x%08x:0x%08x\n", __func__, start, end);
+ debug("%s ok: 0x%08llx:0x%08llx\n", __func__,
+ (unsigned long long)start,
+ (unsigned long long)end);
new = xzalloc(sizeof(*new));
init_resource(new, name);
diff --git a/common/uimage.c b/common/uimage.c
index 1ac0b7d..06f97f0 100644
--- a/common/uimage.c
+++ b/common/uimage.c
@@ -440,8 +440,9 @@ struct resource *uimage_load_to_sdram(struct uimage_handle *handle,
uimage_resource = request_sdram_region("uimage",
start, size);
if (!uimage_resource) {
- printf("unable to request SDRAM 0x%08x-0x%08x\n",
- start, start + size - 1);
+ printf("unable to request SDRAM 0x%08llx-0x%08llx\n",
+ (unsigned long long)start,
+ (unsigned long long)start + size - 1);
return NULL;
}