blob: 83f862677a672374afa5b3e51d5733c3f6904a25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
From c7a709f3d9b7628d5416e45c365901381beef7cc Mon Sep 17 00:00:00 2001
From: Ashish Kulkarni <kulkarni.ashish@gmail.com>
Date: Tue, 20 Dec 2016 17:57:26 +0530
Subject: [PATCH] fix compilation warning with GCC 6.2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
../lib/pdfsettings.cc: In function ‘QString wkhtmltopdf::settings::unitRealToStr(const UnitReal&, bool*)’:
../lib/pdfsettings.cc:308:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (ok) *ok=false; break;
^~
../lib/pdfsettings.cc:308:22: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
if (ok) *ok=false; break;
^~~~~
---
src/lib/pdfsettings.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lib/pdfsettings.cc b/src/lib/pdfsettings.cc
index e3c62526..b339ec10 100644
--- a/src/lib/pdfsettings.cc
+++ b/src/lib/pdfsettings.cc
@@ -305,7 +305,8 @@ QString unitRealToStr(const UnitReal & ur, bool * ok) {
case QPrinter::Point: c = "pt"; break;
case QPrinter::Millimeter: c = "mm"; break;
default:
- if (ok) *ok=false; break;
+ if (ok) *ok=false;
+ return "";
}
return QString("%1%2").arg(ur.first).arg(c);
}
|