mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 22:28:22 +01:00
Merge "use explicit size of kErrorMessages[] arrays"
This commit is contained in:
commit
4595b62b7c
@ -643,7 +643,7 @@ static void HelpLong(void) {
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Error messages
|
// Error messages
|
||||||
|
|
||||||
static const char* const kErrorMessages[] = {
|
static const char* const kErrorMessages[VP8_ENC_ERROR_LAST] = {
|
||||||
"OK",
|
"OK",
|
||||||
"OUT_OF_MEMORY: Out of memory allocating objects",
|
"OUT_OF_MEMORY: Out of memory allocating objects",
|
||||||
"BITSTREAM_OUT_OF_MEMORY: Out of memory re-allocating byte buffer",
|
"BITSTREAM_OUT_OF_MEMORY: Out of memory re-allocating byte buffer",
|
||||||
|
@ -113,7 +113,7 @@ int ExUtilWriteFile(const char* const file_name,
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// WebP decoding
|
// WebP decoding
|
||||||
|
|
||||||
static const char* const kStatusMessages[] = {
|
static const char* const kStatusMessages[VP8_STATUS_NOT_ENOUGH_DATA + 1] = {
|
||||||
"OK", "OUT_OF_MEMORY", "INVALID_PARAM", "BITSTREAM_ERROR",
|
"OK", "OUT_OF_MEMORY", "INVALID_PARAM", "BITSTREAM_ERROR",
|
||||||
"UNSUPPORTED_FEATURE", "SUSPENDED", "USER_ABORT", "NOT_ENOUGH_DATA"
|
"UNSUPPORTED_FEATURE", "SUSPENDED", "USER_ABORT", "NOT_ENOUGH_DATA"
|
||||||
};
|
};
|
||||||
|
@ -194,7 +194,7 @@ static void DisplayGifError(const GifFileType* const gif, int gif_error) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char* const kErrorMessages[] = {
|
static const char* const kErrorMessages[-WEBP_MUX_NOT_ENOUGH_DATA + 1] = {
|
||||||
"WEBP_MUX_NOT_FOUND", "WEBP_MUX_INVALID_ARGUMENT", "WEBP_MUX_BAD_DATA",
|
"WEBP_MUX_NOT_FOUND", "WEBP_MUX_INVALID_ARGUMENT", "WEBP_MUX_BAD_DATA",
|
||||||
"WEBP_MUX_MEMORY_ERROR", "WEBP_MUX_NOT_ENOUGH_DATA"
|
"WEBP_MUX_MEMORY_ERROR", "WEBP_MUX_NOT_ENOUGH_DATA"
|
||||||
};
|
};
|
||||||
|
@ -130,7 +130,7 @@ static int CountOccurrences(const char* arglist[], int list_length,
|
|||||||
return num_occurences;
|
return num_occurences;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char* const kErrorMessages[] = {
|
static const char* const kErrorMessages[-WEBP_MUX_NOT_ENOUGH_DATA + 1] = {
|
||||||
"WEBP_MUX_NOT_FOUND", "WEBP_MUX_INVALID_ARGUMENT", "WEBP_MUX_BAD_DATA",
|
"WEBP_MUX_NOT_FOUND", "WEBP_MUX_INVALID_ARGUMENT", "WEBP_MUX_BAD_DATA",
|
||||||
"WEBP_MUX_MEMORY_ERROR", "WEBP_MUX_NOT_ENOUGH_DATA"
|
"WEBP_MUX_MEMORY_ERROR", "WEBP_MUX_NOT_ENOUGH_DATA"
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user