Patched quirc to finally rid ourselves of those compiler warnings
This commit is contained in:
@@ -117,7 +117,7 @@ static const uint8_t gf256_log[256] = {
|
||||
0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf
|
||||
};
|
||||
|
||||
const static struct galois_field gf256 = {
|
||||
static const struct galois_field gf256 = {
|
||||
.p = 255,
|
||||
.log = gf256_log,
|
||||
.exp = gf256_exp
|
||||
@@ -873,7 +873,7 @@ static quirc_decode_error_t decode_payload(struct quirc_data *data,
|
||||
done:
|
||||
|
||||
/* Add nul terminator to all payloads */
|
||||
if (data->payload_len >= sizeof(data->payload))
|
||||
if ((unsigned int)data->payload_len >= sizeof(data->payload))
|
||||
data->payload_len--;
|
||||
data->payload[data->payload_len] = 0;
|
||||
|
||||
|
||||
@@ -348,6 +348,7 @@ static void threshold(struct quirc *q)
|
||||
|
||||
static void area_count(void *user_data, int y, int left, int right)
|
||||
{
|
||||
(void)y;
|
||||
((struct quirc_region *)user_data)->count += right - left + 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,8 @@ static const char *const error_table[] = {
|
||||
|
||||
const char *quirc_strerror(quirc_decode_error_t err)
|
||||
{
|
||||
if (err >= 0 && err < sizeof(error_table) / sizeof(error_table[0]))
|
||||
// note from Anemone3DS dev - L88 used to compare err >= 0, but err is always positive
|
||||
if (err < sizeof(error_table) / sizeof(error_table[0]))
|
||||
return error_table[err];
|
||||
|
||||
return "Unknown error";
|
||||
|
||||
Reference in New Issue
Block a user