Make newer gcc happy about fallthrough
on HtmlOutputDev.cc fixes a leak when printHtml is false
diff --git a/fofi/FoFiTrueType.cc b/fofi/FoFiTrueType.cc
index f1a15e0..58f604a 100644
--- a/fofi/FoFiTrueType.cc
+++ b/fofi/FoFiTrueType.cc
@@ -1307,8 +1307,10 @@
switch (length & 3) {
case 3:
word |= (data[i+2] & 0xff) << 8;
+ // fallthrough
case 2:
word |= (data[i+1] & 0xff) << 16;
+ // fallthrough
case 1:
word |= (data[i ] & 0xff) << 24;
break;
diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index db9a571..1474c2c 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -4681,7 +4681,7 @@
appearBuf->appendf(" {0:.2f}", dash[i]);
}
appearBuf->append("] 0 d\n");
- // fall through to the solid case
+ // fallthrough
case AnnotBorder::borderSolid:
case AnnotBorder::borderUnderlined:
appearBuf->appendf("{0:.2f} w\n", w);
@@ -4713,7 +4713,7 @@
appearBuf->appendf(" {0:.2f}", dash[i]);
}
appearBuf->append("] 0 d\n");
- // fall through to the solid case
+ // fallthrough
case AnnotBorder::borderSolid:
appearBuf->appendf("{0:.2f} w\n", w);
setColor(aColor, gFalse);
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 4f4128f..dc5b687 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -128,6 +128,7 @@
break;
case splashModeXBGR8:
color[3] = 255;
+ // fallthrough
case splashModeBGR8:
case splashModeRGB8:
colorSpace->getRGB(src, &rgb);
@@ -175,6 +176,7 @@
break;
case splashModeXBGR8:
dest[3] = 255;
+ // fallthrough
case splashModeBGR8:
case splashModeRGB8:
{
@@ -1016,6 +1018,7 @@
break;
case splashModeXBGR8:
src[3] = 255;
+ // fallthrough
case splashModeRGB8:
case splashModeBGR8:
setSat(src[0], src[1], src[2], getSat(dest[0], dest[1], dest[2]),
@@ -1066,6 +1069,7 @@
break;
case splashModeXBGR8:
src[3] = 255;
+ // fallthrough
case splashModeRGB8:
case splashModeBGR8:
setSat(dest[0], dest[1], dest[2], getSat(src[0], src[1], src[2]),
@@ -1113,6 +1117,7 @@
break;
case splashModeXBGR8:
src[3] = 255;
+ // fallthrough
case splashModeRGB8:
case splashModeBGR8:
setLum(src[0], src[1], src[2], getLum(dest[0], dest[1], dest[2]),
@@ -1157,6 +1162,7 @@
break;
case splashModeXBGR8:
src[3] = 255;
+ // fallthrough
case splashModeRGB8:
case splashModeBGR8:
setLum(dest[0], dest[1], dest[2], getLum(src[0], src[1], src[2]),
@@ -1570,6 +1576,7 @@
break;
case splashModeXBGR8:
color[3] = 255;
+ // fallthrough
case splashModeRGB8:
case splashModeBGR8:
color[0] = color[1] = color[2] = 0;
@@ -4428,6 +4435,7 @@
break;
case splashModeXBGR8:
color[3] = 255;
+ // fallthrough
case splashModeRGB8:
case splashModeBGR8:
transpGroupStack->blendingColorSpace->getRGB(backdropColor, &rgb);
diff --git a/splash/Splash.cc b/splash/Splash.cc
index aba7814..83bd2e3 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -580,12 +580,14 @@
#endif
case splashModeXBGR8:
cSrcNonIso[3] = 255;
+ // fallthrough
case splashModeRGB8:
case splashModeBGR8:
cSrcNonIso[2] = clip255(pipe->cSrc[2] +
((pipe->cSrc[2] - cDest[2]) * t) / 255);
cSrcNonIso[1] = clip255(pipe->cSrc[1] +
((pipe->cSrc[1] - cDest[1]) * t) / 255);
+ // fallthrough
case splashModeMono1:
case splashModeMono8:
cSrcNonIso[0] = clip255(pipe->cSrc[0] +
diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index ac80dc1..7f933f0 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -1656,10 +1656,9 @@
return file;
}
case actionLaunch:
- {
- LinkLaunch *ha=(LinkLaunch *) link->getAction();
- GooString* file=new GooString(ha->getFileName()->getCString());
- if (printHtml) {
+ if (printHtml) {
+ LinkLaunch *ha=(LinkLaunch *) link->getAction();
+ GooString* file=new GooString(ha->getFileName()->getCString());
p=file->getCString()+file->getLength()-4;
if (!strcmp(p, ".pdf") || !strcmp(p, ".PDF")){
file->del(file->getLength()-4,4);
@@ -1670,7 +1669,7 @@
return file;
}
- }
+ // fallthrough
default:
return new GooString();
}