From 7370e83d605814c0d79482427dd17a2621a86c7e Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sat, 31 Jan 2015 21:45:23 +0000 Subject: Squash a minor warning from GCC --- amiga/bitmap.c | 5 ++--- amiga/rtg.c | 3 +++ amiga/thumbnail.c | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/amiga/bitmap.c b/amiga/bitmap.c index 02797bc86..54ac1eac4 100644 --- a/amiga/bitmap.c +++ b/amiga/bitmap.c @@ -381,8 +381,8 @@ struct bitmap *ami_bitmap_from_datatype(char *filename) static struct BitMap *ami_bitmap_get_truecolour(struct bitmap *bitmap,int width,int height,struct BitMap *friendbm) { -#ifdef __amigaos4__ struct BitMap *tbm = NULL; +#ifdef __amigaos4__ if(!bitmap) return NULL; @@ -479,9 +479,8 @@ static struct BitMap *ami_bitmap_get_truecolour(struct bitmap *bitmap,int width, bitmap->nativebmheight = height; } } - - return tbm; #endif + return tbm; } PLANEPTR ami_bitmap_get_mask(struct bitmap *bitmap, int width, diff --git a/amiga/rtg.c b/amiga/rtg.c index 33d0242d4..e1562841e 100644 --- a/amiga/rtg.c +++ b/amiga/rtg.c @@ -28,6 +28,9 @@ struct BitMap *ami_rtg_allocbitmap(ULONG width, ULONG height, ULONG depth, ULONG flags, struct BitMap *friend, RGBFTYPE format) { if(P96Base == NULL) { +#ifndef __amigaos4__ + if(depth > 8) depth = 8; +#endif return AllocBitMap(width, height, depth, flags, friend); } else { return p96AllocBitMap(width, height, depth, flags, friend, format); diff --git a/amiga/thumbnail.c b/amiga/thumbnail.c index 09d8afe42..310630f77 100755 --- a/amiga/thumbnail.c +++ b/amiga/thumbnail.c @@ -117,3 +117,4 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap, return true; } + -- cgit v1.2.3