summaryrefslogtreecommitdiff
path: root/examples/standalone/timer.c
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2011-04-25 01:39:43 +0000
committerWolfgang Denk <wd@denx.de>2011-05-12 23:17:52 +0200
commitcd8c87756a46ae3544e563793ce8c18efd1091d1 (patch)
tree4e553a071dbc031feb6c9fd481c8565dd26a408a /examples/standalone/timer.c
parent2cc195e0a5690bf022631ae420767e5b91c37476 (diff)
downloadu-boot-imx-cd8c87756a46ae3544e563793ce8c18efd1091d1.zip
u-boot-imx-cd8c87756a46ae3544e563793ce8c18efd1091d1.tar.gz
u-boot-imx-cd8c87756a46ae3544e563793ce8c18efd1091d1.tar.bz2
Fix a few gcc warnings.
Noticed while building all of mpc8xx. Also constify usage string in timer.c Warnings fixed are: timer.c: In function 'timer': timer.c:189: warning: format not a string literal and no format arguments timer.c:258: warning: format not a string literal and no format arguments atm.c: In function 'atmUnload': atm.c:99: warning: array subscript is above array bounds atm.c: In function 'atmLoad': atm.c:65: warning: array subscript is above array bounds codec.c: In function 'codsp_write_pop_int': codec.c:678: warning: array subscript is above array bounds codec.c: In function 'codsp_write_cop_short': codec.c:585: warning: array subscript is above array bounds codec.c: In function 'codsp_write_sop_int': codec.c:512: warning: array subscript is above array bounds Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Diffstat (limited to 'examples/standalone/timer.c')
-rw-r--r--examples/standalone/timer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/standalone/timer.c b/examples/standalone/timer.c
index 834cc9a..8fd38b2 100644
--- a/examples/standalone/timer.c
+++ b/examples/standalone/timer.c
@@ -113,7 +113,7 @@ typedef struct tid_8xx_cpmtimer_s {
void setPeriod (tid_8xx_cpmtimer_t *hwp, ulong interval);
-static char *usage = "\n[q, b, e, ?] ";
+static const char usage[] = "\n[q, b, e, ?] ";
int timer (int argc, char * const argv[])
{
@@ -186,7 +186,7 @@ int timer (int argc, char * const argv[])
/* clear all events */
*hwp->terp = (CPMT_EVENT_CAP | CPMT_EVENT_REF);
- printf (usage);
+ puts(usage);
running = 0;
while ((c = getc()) != 'q') {
if (c == 'b') {
@@ -255,7 +255,7 @@ int timer (int argc, char * const argv[])
} else {
printf ("\nEnter: q - quit, b - start timer, e - stop timer, ? - get status\n");
}
- printf (usage);
+ puts(usage);
}
if (running) {
printf ("Stopping timer\n");