Silence -Wstring-plus-int with clang.

cores/libretro-imageviewer/image_core.c:75:59: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
static const char* IMAGE_CORE_PREFIX(valid_extensions) = 1+ /* to remove the first |, the alternative is 25 extra lines of ifdef/etc */
                                                         ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cores/libretro-imageviewer/image_core.c:75:59: note: use array indexing to silence this warning
1 warning generated.
This commit is contained in:
orbea 2019-07-22 12:24:41 -07:00
parent 847a92c2a7
commit 043977474e

View File

@ -72,7 +72,7 @@ static struct string_list *image_file_list;
static const char* IMAGE_CORE_PREFIX(valid_extensions) = "jpg|jpeg|png|bmp|psd|tga|gif|hdr|pic|ppm|pgm";
#else
static const char* IMAGE_CORE_PREFIX(valid_extensions) = 1+ /* to remove the first |, the alternative is 25 extra lines of ifdef/etc */
static const char image_formats[] =
#ifdef HAVE_RJPEG
"|jpg|jpeg"
@ -95,6 +95,9 @@ static const char* IMAGE_CORE_PREFIX(valid_extensions) = 1+ /* to remove the fir
#endif
;
/* to remove the first |, the alternative is 25 extra lines of ifdef/etc */
static const char* IMAGE_CORE_PREFIX(valid_extensions) = image_formats + 1;
#endif
void IMAGE_CORE_PREFIX(retro_get_system_info)(struct retro_system_info *info)