libcupsfilters: Silenced compiler warnings in pdftoraster() filter function
@@ -25,7 +25,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
- pdftoraster.cc
+ pdftoraster.cxx
pdf to raster filter function
*/
@@ -1497,7 +1497,6 @@ int pdftoraster(int inputfd, /* I - File descriptor input stream */
void *ld = data->logdata;
int deviceCopies = 1;
bool deviceCollate = false;
- unsigned int popplerBitsPerPixel;
conversion_function_t convert;
filter_iscanceledfunc_t iscanceled = data->iscanceledfunc;
void *icd = data->iscanceleddata;
@@ -1674,7 +1673,6 @@ int pdftoraster(int inputfd, /* I - File descriptor input stream */
case CUPS_CSPACE_RGBW:
case CUPS_CSPACE_GMCK:
case CUPS_CSPACE_GMCS:
- popplerBitsPerPixel = 24;
doc.popplerNumColors = 3;
break;
case CUPS_CSPACE_K:
@@ -1683,12 +1681,6 @@ int pdftoraster(int inputfd, /* I - File descriptor input stream */
case CUPS_CSPACE_WHITE:
case CUPS_CSPACE_GOLD:
case CUPS_CSPACE_SILVER:
- if (doc.header.cupsBitsPerColor == 1
- && doc.header.cupsBitsPerPixel == 1) {
- popplerBitsPerPixel = 1;
- } else {
- popplerBitsPerPixel = 8;
- }
/* set paper color white */
doc.popplerNumColors = 1;
break;
@@ -1708,6 +1700,7 @@ int pdftoraster(int inputfd, /* I - File descriptor input stream */
"pdftoraster: Can't open raster stream.\n");
exit(1);
}
+ memset(&convert, 0, sizeof(conversion_function_t));
selectConvertFunc(raster, &doc, &convert, log, ld);
if(doc.poppler_doc != NULL){
for (i = 1;i <= npages;i++) {
