summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbigbiff bigbiff <bigbiff@teamw.in>2019-06-06 01:55:11 +0200
committerbigbiff bigbiff <bigbiff@teamw.in>2019-06-06 02:00:54 +0200
commit3c897aec161813805fad4ae3ada7565226816c17 (patch)
tree4fae77c49972f194df9e6f205233455760b1090b
parentFix symlink creation (diff)
downloadandroid_bootable_recovery-3c897aec161813805fad4ae3ada7565226816c17.tar
android_bootable_recovery-3c897aec161813805fad4ae3ada7565226816c17.tar.gz
android_bootable_recovery-3c897aec161813805fad4ae3ada7565226816c17.tar.bz2
android_bootable_recovery-3c897aec161813805fad4ae3ada7565226816c17.tar.lz
android_bootable_recovery-3c897aec161813805fad4ae3ada7565226816c17.tar.xz
android_bootable_recovery-3c897aec161813805fad4ae3ada7565226816c17.tar.zst
android_bootable_recovery-3c897aec161813805fad4ae3ada7565226816c17.zip
-rw-r--r--fb2png/fb.c1
-rw-r--r--fb2png/img_process.c16
-rw-r--r--fb2png/log.h4
3 files changed, 10 insertions, 11 deletions
diff --git a/fb2png/fb.c b/fb2png/fb.c
index 2ed478902..a17f801df 100644
--- a/fb2png/fb.c
+++ b/fb2png/fb.c
@@ -48,7 +48,6 @@ static int fb_get_format(const struct fb *fb)
{
int ao = fb->alpha_offset;
int ro = fb->red_offset;
- int go = fb->green_offset;
int bo = fb->blue_offset;
#define FB_FORMAT_UNKNOWN 0
diff --git a/fb2png/img_process.c b/fb2png/img_process.c
index eb75e9a21..535ec2287 100644
--- a/fb2png/img_process.c
+++ b/fb2png/img_process.c
@@ -32,7 +32,7 @@ int rgb565_to_rgb888(const char* src, char* dst, size_t pixel)
from = (struct rgb565 *) src;
to = (struct rgb888 *) dst;
- int i = 0;
+ size_t i = 0;
/* traverse pixel of the row */
while(i++ < pixel) {
@@ -53,7 +53,7 @@ int rgb565_to_rgb888(const char* src, char* dst, size_t pixel)
int argb8888_to_rgb888(const char* src, char* dst, size_t pixel)
{
- int i;
+ size_t i;
struct argb8888 *from;
struct rgb888 *to;
@@ -77,7 +77,7 @@ int argb8888_to_rgb888(const char* src, char* dst, size_t pixel)
int abgr8888_to_rgb888(const char* src, char* dst, size_t pixel)
{
- int i;
+ size_t i;
struct abgr8888 *from;
struct rgb888 *to;
@@ -101,7 +101,7 @@ int abgr8888_to_rgb888(const char* src, char* dst, size_t pixel)
int bgra8888_to_rgb888(const char* src, char* dst, size_t pixel)
{
- int i;
+ size_t i;
struct bgra8888 *from;
struct rgb888 *to;
@@ -125,7 +125,7 @@ int bgra8888_to_rgb888(const char* src, char* dst, size_t pixel)
int rgba8888_to_rgb888(const char* src, char* dst, size_t pixel)
{
- int i;
+ size_t i;
struct rgba8888 *from;
struct rgb888 *to;
@@ -164,19 +164,19 @@ stdio_write_func (png_structp png, png_bytep data, png_size_t size)
}
static void
-png_simple_output_flush_fn (png_structp png_ptr)
+png_simple_output_flush_fn (__attribute__((unused)) png_structp png_ptr)
{
}
static void
-png_simple_error_callback (png_structp png,
+png_simple_error_callback (__attribute__((unused)) png_structp png,
png_const_charp error_msg)
{
E("png error: %s\n", error_msg);
}
static void
-png_simple_warning_callback (png_structp png,
+png_simple_warning_callback (__attribute__((unused)) png_structp png,
png_const_charp error_msg)
{
fprintf(stderr, "png warning: %s\n", error_msg);
diff --git a/fb2png/log.h b/fb2png/log.h
index 2b7cf8cec..a2e3f5f54 100644
--- a/fb2png/log.h
+++ b/fb2png/log.h
@@ -57,7 +57,7 @@
#endif
-static void
+__attribute__((unused)) static void
D(const char *msg, ...)
{
va_list ap;
@@ -69,7 +69,7 @@ D(const char *msg, ...)
fflush(stdout);
}
-static void
+__attribute__((unused)) static void
E(const char *msg, ...)
{
va_list ap;