diff options
author | Kai Köhne <kai.koehne@qt.io> | 2021-04-29 15:55:11 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2021-05-03 13:04:47 +0000 |
commit | 16a1ba69a682fbe7855682448ac0340574a67035 (patch) | |
tree | 87b1d7191392d70ff130c9410b3dc64e4394faf9 /src/gui/image/qimage.cpp | |
parent | b5ceba01288acee2b658ea6599abd2e55d389aa4 (diff) |
Disable spurious MSVC warning C4273 in Qt Gui, Qt OpenGL
For optimized/release builds, cl 19.28 produces some false positive
"potential divide by 0" warnings even for code where no valid code path
can lead to such a division.
Fixes: QTBUG-92940
Pick-to: 6.1
Change-Id: I461f9104d7b9dc2d74839bf30bebb2b9d4cf2db3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/image/qimage.cpp')
-rw-r--r-- | src/gui/image/qimage.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 8011aa2eb5..95be9772c8 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -77,6 +77,11 @@ QT_BEGIN_NAMESPACE +// MSVC 19.28 does show spurious warning "C4723: potential divide by 0" for code that divides +// by height() in release builds. Anyhow, all the code paths in this file are only executed +// for valid QImage's, where height() cannot be 0. Therefore disable the warning. +QT_WARNING_DISABLE_MSVC(4723) + static inline bool isLocked(QImageData *data) { return data != nullptr && data->is_locked; |