Skip to content

Commit c7a709f

Browse files
committed
fix compilation warning with GCC 6.2
../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; ^~~~~
1 parent af95531 commit c7a709f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/pdfsettings.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ QString unitRealToStr(const UnitReal & ur, bool * ok) {
305305
case QPrinter::Point: c = "pt"; break;
306306
case QPrinter::Millimeter: c = "mm"; break;
307307
default:
308-
if (ok) *ok=false; break;
308+
if (ok) *ok=false;
309+
return "";
309310
}
310311
return QString("%1%2").arg(ur.first).arg(c);
311312
}

0 commit comments

Comments
 (0)