summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-01-03 14:51:07 -0200
committerAlex Blasche <alexander.blasche@theqtcompany.com>2016-01-08 11:36:13 +0000
commitbc108d7c7ea491bfc8618a8389d4806aea44bfbf (patch)
tree3d75c1732452ac7052a1e3451bd7594e46d446fe
parent09c92863001790a0304a5ef389901ee2b5b6cdc2 (diff)
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>
-rw-r--r--src/dbus/qdbuserror.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dbus/qdbuserror.cpp b/src/dbus/qdbuserror.cpp
index 40e97ae483..d6a329cfe8 100644
--- a/src/dbus/qdbuserror.cpp
+++ b/src/dbus/qdbuserror.cpp
@@ -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)
{