Prechádzať zdrojové kódy

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;
                      ^~~~~
Ashish Kulkarni 8 rokov pred
rodič
commit
c7a709f3d9
1 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  1. 2 1
      src/lib/pdfsettings.cc

+ 2 - 1
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);
 }