Work around GCC 6 warning about offset outside bounds of string
This is a false positive because the only offset that can be outside the bounds was the last one (-1), which could not be reached in this line because of the qBound on the line before limiting the maximum value. The -1 wasn't generated by the Perl script embedded in the file anyway. qdbuserror.cpp:142:64: error: offset outside bounds of constant string [-Werror] Change-Id: I24a735698d3c4a719fc9ffff1425f8aad5e5978e Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>bb10
parent
09c9286300
commit
bc108d7c7e
|
|
@ -130,11 +130,11 @@ static const int errorMessages_indices[] = {
|
|||
0, 6, 40, 76, 118, 153, 191, 231,
|
||||
273, 313, 349, 384, 421, 461, 501, 540,
|
||||
581, 617, 661, 705, 746, 789, 833, 874,
|
||||
916, 961, 1005, -1
|
||||
916, 961, 1005
|
||||
};
|
||||
|
||||
static const int errorMessages_count = sizeof errorMessages_indices /
|
||||
sizeof errorMessages_indices[0] - 1;
|
||||
sizeof errorMessages_indices[0];
|
||||
|
||||
static inline const char *get(QDBusError::ErrorType code)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue