summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2017-12-23 21:23:06 -0500
committerFranklin Wei <git@fwei.tk>2017-12-23 21:28:20 -0500
commit6416d96fbc6946a0eee8ba29bb881fbf4dcbe607 (patch)
tree3a1e0bf7766c9589c223fa70e5309de0593e3930
parenta855d6202536ff28e5aae4f22a0f31d8f5b325d0 (diff)
downloadrockbox-6416d96fbc6946a0eee8ba29bb881fbf4dcbe607.tar.gz
rockbox-6416d96fbc6946a0eee8ba29bb881fbf4dcbe607.zip
fix red
Change-Id: I20f1bd6f0208f6108d68fb59206b09dd9da4f1af
-rw-r--r--apps/plugins/sdl/sdl.make2
-rw-r--r--apps/plugins/sdl/src/video/rockbox/SDL_rockboxvideo.c6
-rw-r--r--apps/plugins/sdl/src/video/rockbox/keymaps_extra.h3
-rw-r--r--firmware/common/vuprintf.c3
4 files changed, 8 insertions, 6 deletions
diff --git a/apps/plugins/sdl/sdl.make b/apps/plugins/sdl/sdl.make
index fedbaa5399..df7ec74ebf 100644
--- a/apps/plugins/sdl/sdl.make
+++ b/apps/plugins/sdl/sdl.make
@@ -23,7 +23,7 @@ OTHER_INC += -I$(SDL_SRCDIR)/include
23# include comes first because of possible system SDL headers taking 23# include comes first because of possible system SDL headers taking
24# precedence 24# precedence
25SDLFLAGS = -I$(SDL_SRCDIR)/include $(filter-out -O%,$(PLUGINFLAGS)) \ 25SDLFLAGS = -I$(SDL_SRCDIR)/include $(filter-out -O%,$(PLUGINFLAGS)) \
26-O3 -Wno-unused-parameter -Xpreprocessor -Wno-undef -Wcast-align 26-O3 -Wno-unused-parameter -Xpreprocessor -Wno-undef -Wcast-align -w
27 27
28ifndef APP_TYPE 28ifndef APP_TYPE
29 ### no target has a big enough plugin buffer 29 ### no target has a big enough plugin buffer
diff --git a/apps/plugins/sdl/src/video/rockbox/SDL_rockboxvideo.c b/apps/plugins/sdl/src/video/rockbox/SDL_rockboxvideo.c
index 2f16f3cd8b..58de15754d 100644
--- a/apps/plugins/sdl/src/video/rockbox/SDL_rockboxvideo.c
+++ b/apps/plugins/sdl/src/video/rockbox/SDL_rockboxvideo.c
@@ -669,12 +669,12 @@ static void ROCKBOX_UnlockHWSurface(_THIS, SDL_Surface *surface)
669#if LCD_PIXELFORMAT == RGB565SWAPPED 669#if LCD_PIXELFORMAT == RGB565SWAPPED
670static void flip_pixels(int x, int y, int w, int h) 670static void flip_pixels(int x, int y, int w, int h)
671{ 671{
672 for(int y = rects[i].y; y < rects[i].y + rects[i].h; ++y) 672 for(int y_0 = y; y_0 < y + h; ++y_0)
673 { 673 {
674 for(int x = rects[i].x; x < rects[i].x + rects[i].w; ++x) 674 for(int x_0 = x; x_0 < x + w; ++x_0)
675 { 675 {
676 /* swap pixels directly in the framebuffer */ 676 /* swap pixels directly in the framebuffer */
677 rb->lcd_framebuffer[y * LCD_WIDTH + x] = swap16(rb->lcd_framebuffer[y * LCD_WIDTH + x]); 677 rb->lcd_framebuffer[y_0 * LCD_WIDTH + x_0] = swap16(rb->lcd_framebuffer[y_0 * LCD_WIDTH + x_0]);
678 } 678 }
679 } 679 }
680} 680}
diff --git a/apps/plugins/sdl/src/video/rockbox/keymaps_extra.h b/apps/plugins/sdl/src/video/rockbox/keymaps_extra.h
index a205262c33..2da5c0e69d 100644
--- a/apps/plugins/sdl/src/video/rockbox/keymaps_extra.h
+++ b/apps/plugins/sdl/src/video/rockbox/keymaps_extra.h
@@ -25,8 +25,7 @@
25#ifndef _SDL_KEYMAPS_EXTRA_H 25#ifndef _SDL_KEYMAPS_EXTRA_H
26#define _SDL_KEYMAPS_EXTRA_H 26#define _SDL_KEYMAPS_EXTRA_H
27 27
28#if (CONFIG_KEYPAD == GIGABEAT_PAD) || \ 28#if (CONFIG_KEYPAD == GIGABEAT_S_PAD)
29 (CONFIG_KEYPAD == GIGABEAT_S_PAD)
30#define BTN_EXTRA1 BUTTON_SELECT 29#define BTN_EXTRA1 BUTTON_SELECT
31#define BTN_EXTRA2 BUTTON_BACK 30#define BTN_EXTRA2 BUTTON_BACK
32#define BTN_EXTRA3 BUTTON_VOL_DOWN 31#define BTN_EXTRA3 BUTTON_VOL_DOWN
diff --git a/firmware/common/vuprintf.c b/firmware/common/vuprintf.c
index becb05e136..a4b3c72680 100644
--- a/firmware/common/vuprintf.c
+++ b/firmware/common/vuprintf.c
@@ -23,6 +23,7 @@
23#include <limits.h> 23#include <limits.h>
24#include <string.h> 24#include <string.h>
25#include <stddef.h> 25#include <stddef.h>
26#include <stdio.h> /* for snprintf */
26#include "system.h" 27#include "system.h"
27#include "vuprintf.h" 28#include "vuprintf.h"
28 29
@@ -533,6 +534,8 @@ static const char * format_f(double f,
533 int radixchar, 534 int radixchar,
534 bool *numericp) 535 bool *numericp)
535{ 536{
537 (void) radixchar;
538 (void) numericp;
536 fmt_buf->length = snprintf(fmt_buf->buf, 24, "%d.%06d", (int)f, ABS((int)((f - (int)f)*1e6))); 539 fmt_buf->length = snprintf(fmt_buf->buf, 24, "%d.%06d", (int)f, ABS((int)((f - (int)f)*1e6)));
537 return fmt_buf->buf; 540 return fmt_buf->buf;
538} 541}