Browse Source

took care of warnings from newer GCCs

Signed-off-by: Christian Kroll <chris@das-labor.org>
feature/2017
Christian Kroll 8 years ago
parent
commit
986a86af13
  1. 2
      scripts/lxdialog/Makefile
  2. 2
      scripts/lxdialog/lxdialog.c
  3. 5
      src/games/kart/kart.c
  4. 7
      src/scrolltext/scrolltext3.c

2
scripts/lxdialog/Makefile

@ -32,7 +32,7 @@ lxdialog: $(OBJS)
$(HOSTCC) $(HOSTCFLAGS) -o lxdialog $(OBJS) $(LIBS) $(HOSTCC) $(HOSTCFLAGS) -o lxdialog $(OBJS) $(LIBS)
ncurses: ncurses:
@echo "main() {}" > lxtemp.c @echo "int main() {return 0;}" > lxtemp.c
@if $(HOSTCC) $(HOSTCFLAGS) -lncurses lxtemp.c ; then \ @if $(HOSTCC) $(HOSTCFLAGS) -lncurses lxtemp.c ; then \
rm -f lxtemp.c a.out; \ rm -f lxtemp.c a.out; \
else \ else \

2
scripts/lxdialog/lxdialog.c

@ -208,7 +208,7 @@ j_inputbox (const char *t, int ac, const char * const * av)
int ret = dialog_inputbox (t, av[2], atoi (av[3]), atoi (av[4]), int ret = dialog_inputbox (t, av[2], atoi (av[3]), atoi (av[4]),
ac == 6 ? av[5] : (char *) NULL); ac == 6 ? av[5] : (char *) NULL);
if (ret == 0) if (ret == 0)
fprintf(stderr, dialog_input_result); fputs(dialog_input_result, stderr);
return ret; return ret;
} }

5
src/games/kart/kart.c

@ -23,7 +23,7 @@
#if defined MENU_SUPPORT && defined GAME_KART #if defined MENU_SUPPORT && defined GAME_KART
// icon (TODO: convert to hex) // icon
static const uint8_t icon[8] PROGMEM = static const uint8_t icon[8] PROGMEM =
{ 0xE1, // 0b11100001, { 0xE1, // 0b11100001,
0xE1, // 0b11100001, 0xE1, // 0b11100001,
@ -230,7 +230,8 @@ void kart_game(){
wait(WAIT); wait(WAIT);
} }
snprintf(game_over, sizeof(game_over), "</#Game Over, Score: %lu", cycle); snprintf(game_over, sizeof(game_over), "</#Game Over, Score: %lu",
(long unsigned)cycle);
scrolltext(game_over); scrolltext(game_over);
} }

7
src/scrolltext/scrolltext3.c

@ -34,12 +34,17 @@
#define MAX_FONTS 1 #define MAX_FONTS 1
font fonts[MAX_FONTS]; font fonts[MAX_FONTS];
// never used
/*
#define MAX_SPECIALCOLORS 3 #define MAX_SPECIALCOLORS 3
static const unsigned char PROGMEM colorTable[MAX_SPECIALCOLORS * NUM_ROWS] = {1, 1, 2, 3, 3, 2, 1, 1, static const unsigned char PROGMEM colorTable[MAX_SPECIALCOLORS * NUM_ROWS] ={
1, 1, 2, 3, 3, 2, 1, 1,
3, 3, 2, 1, 1, 2, 3, 3, 3, 3, 2, 1, 1, 2, 3, 3,
3, 3, 2, 2, 3, 3, 2, 2 3, 3, 2, 2, 3, 3, 2, 2
}; };
*/
static const char default_text[] PROGMEM = SCROLLTEXT_TEXT; static const char default_text[] PROGMEM = SCROLLTEXT_TEXT;
char scrolltext_text[SCROLLTEXT_BUFFER_SIZE]; char scrolltext_text[SCROLLTEXT_BUFFER_SIZE];

Loading…
Cancel
Save