summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2014-01-29 09:24:18 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2014-02-26 12:17:20 +0100
commit80813208e19746559137b2bca9eb2fee8e680662 (patch)
tree98fb7a6425930aa67a564a62f014716724a65556
parent134c95c81749d7b0fd65a528eea7ac0441aa7454 (diff)
mobile: Fixed compiler warning at gsm322.cjolly/handover
This patch resolves the following issue: In function 'memset', inlined from 'bargraph.constprop.14' at gsm322.c:325:8: /usr/include/bits/string3.h:81:30: warning: call to '__warn_memset_zero_len' declared with attribute warning: memset used with constant zero length parameter; this could be due to transposed parameters [enabled by default]
-rw-r--r--src/host/layer23/src/mobile/gsm322.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c
index 87c4694..4961471 100644
--- a/src/host/layer23/src/mobile/gsm322.c
+++ b/src/host/layer23/src/mobile/gsm322.c
@@ -322,7 +322,8 @@ static char *bargraph(int value, int min, int max)
else
value -= min;
- memset(bar, '=', value);
+ if (value)
+ memset(bar, '=', value);
bar[value] = '\0';
return bar;