New Ghostscript/GhostPDL compiler warnings - 2017-12-14-03:30:10 - 7a13371ec8dc077c4a3b28f6935206fe06fc534e

[email protected]
Newsgroups gmane.comp.printing.ghostscript.regression
Message-ID <20171214130734.988482040162@i7>
Previous Revision: 099ba1f50e2af5d43a9f007575e78e3605d008be
 Current Revision: 7a13371ec8dc077c4a3b28f6935206fe06fc534e

commit 7a13371ec8dc077c4a3b28f6935206fe06fc534e
Author:     Ken Sharp <[email protected]>
AuthorDate: Thu Nov 2 08:24:59 2017 +0000
CommitDate: Thu Dec 14 11:21:51 2017 +0000

    New devices - pdfimage and PCLm
    
    These devices render input to a bitmap (or in the case of PCLm
    multiple bitmaps) then wraps the bitmap(s) up as the content of
    a PDF file. For PCLm there are some additional rules regarding
    headers, extra content and the order in which the content is
    written in the PDF file.
    
    The aim is to support the PCLm mobile printing standard, and
    to permit production of PDF files from input where the graphics
    model differs significantly from PDF (eg PCL and RasterOPs).
    
    Devices are named pdfimage8, pdfimage24, pdfimage32 and PCLm.
    
    Currently produce valid PDF files with a colour depth of 8 (Gray),
    24 (RGB) or 32 (CMYK), the PCLm device only supports 24-bit RGB.
    
    Devices supports the DownScaleFactor switch to implement
    page level anti-aliasing
    
    -sCompression can be set to None, LZW, Flate, JPEG or RLE (LZW
    is not supported on PCLm, None is only available on PCLm for
    debugging purposes).
    
    The PCLm device supports -dStripHeight to set the vertical height
    of the strips of image content, as required by the specification.
    
    For JPEG compression the devices support both the JPEGQ and
    QFactor controls, exactly as per the jpeg and jpeggray devices.

base/unixansi.mak
configure.ac
devices/devs.mak
devices/gdevpdfimg.c
devices/vector/gdevpdfe.c
doc/Devices.htm
psi/msvc.mak
psi/os2.mak



Ghostscript:

new gcc warnings (gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609): 

./devices/gdevpdfimg.c:106:12: warning: 'pdf_image_set_icc_color_fields' declared 'static' but never defined [-Wunused-function]
./devices/gdevpdfimg.c:1077:1: warning: no previous prototype for 'pdf_image_put_params' [-Wmissing-prototypes]
./devices/gdevpdfimg.c:1261:5: warning: no previous prototype for 'gdev_PCLm_begin_page' [-Wmissing-prototypes]
./devices/gdevpdfimg.c:1289:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
./devices/gdevpdfimg.c:1293:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
./devices/gdevpdfimg.c:1297:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
./devices/gdevpdfimg.c:1341:1: warning: no previous prototype for 'PCLm_downscale_and_print_page' [-Wmissing-prototypes]
./devices/gdevpdfimg.c:1360:13: warning: unused variable 's' [-Wunused-variable]
./devices/gdevpdfimg.c:1361:11: warning: unused variable 'file' [-Wunused-variable]
./devices/gdevpdfimg.c:1690:79: warning: unused variable 'Creator' [-Wunused-variable]
./devices/gdevpdfimg.c:1694:14: warning: unused variable 'digest' [-Wunused-variable]
./devices/gdevpdfimg.c:193:5: warning: no previous prototype for 'gdev_pdf_image_begin_page' [-Wmissing-prototypes]
./devices/gdevpdfimg.c:221:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
./devices/gdevpdfimg.c:221:36: warning: implicit declaration of function 'gsicc_alloc_link_dev' [-Wimplicit-function-declaration]
./devices/gdevpdfimg.c:225:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
./devices/gdevpdfimg.c:229:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
./devices/gdevpdfimg.c:236:17: warning: implicit declaration of function 'gsicc_free_link_dev' [-Wimplicit-function-declaration]
./devices/gdevpdfimg.c:279:5: warning: implicit declaration of function 'gsicc_init_buffer' [-Wimplicit-function-declaration]
./devices/gdevpdfimg.c:317:21: warning: implicit declaration of function 'gs_jpeg_create_compress' [-Wimplicit-function-declaration]
./devices/gdevpdfimg.c:318:13: warning: implicit declaration of function 'gs_jpeg_destroy' [-Wimplicit-function-declaration]
./devices/gdevpdfimg.c:342:21: warning: implicit declaration of function 'gs_jpeg_set_defaults' [-Wimplicit-function-declaration]
./devices/gdevpdfimg.c:349:20: warning: implicit declaration of function 'gs_jpeg_set_quality' [-Wimplicit-function-declaration]
./devices/gdevpdfimg.c:357:20: warning: implicit declaration of function 'gs_jpeg_set_linear_quality' [-Wimplicit-function-declaration]
./devices/gdevpdfimg.c:402:1: warning: no previous prototype for 'pdf_image_downscale_and_print_page' [-Wmissing-prototypes]
./devices/gdevpdfimg.c:627:6: warning: no previous prototype for 'write_xref_entry' [-Wmissing-prototypes]
./devices/gdevpdfimg.c:710:12: warning: 'write_xml' defined but not used [-Wunused-function]
./devices/gdevpdfimg.c:712:48: warning: unused variable 'cre_date_time' [-Wunused-variable]
./devices/gdevpdfimg.c:712:67: warning: unused variable 'mod_date_time' [-Wunused-variable]
./devices/gdevpdfimg.c:712:86: warning: unused variable 'date_time_buf' [-Wunused-variable]
./devices/gdevpdfimg.c:771:13: warning: unused variable 'strm' [-Wunused-variable]
./devices/gdevpdfimg.c:773:9: warning: unused variable 'code' [-Wunused-variable]
./devices/gdevpdfimg.c:799:6: warning: no previous prototype for 'write_fileID' [-Wmissing-prototypes]
./devices/gdevpdfimg.c:846:65: warning: unused variable 'Creator' [-Wunused-variable]
./devices/gdevpdfimg.c:847:17: warning: unused variable 'streamsize' [-Wunused-variable]
./devices/gdevpdfimg.c:850:14: warning: unused variable 'digest' [-Wunused-variable]
./devices/gdevpdfimg.c:90:13: warning: 'PDFDocEncodingLookup' defined but not used [-Wunused-variable]
./devices/gdevpdfimg.c:930:1: warning: no previous prototype for 'pdf_image_compression_param_string' [-Wmissing-prototypes]
./devices/gdevpdfimg.c:942:1: warning: no previous prototype for 'pdf_image_compression_id' [-Wmissing-prototypes]
./devices/gdevpdfimg.c:987:1: warning: no previous prototype for 'pdf_image_get_params' [-Wmissing-prototypes]

http://miles.ghostscript.com:8080/artifex/7a13371ec8dc077c4a3b28f6935206fe06fc534e/gs-gcc-warnings.txt



new clang warnings (clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)): 

./devices/gdevpdfimg.c:106:12: warning: unused function 'pdf_image_set_icc_color_fields' [-Wunused-function]
static int pdf_image_set_icc_color_fields(gx_device_printer *pdev);
           ^

./devices/gdevpdfimg.c:1077:1: warning: no previous prototype for function 'pdf_image_put_params' [-Wmissing-prototypes]
pdf_image_put_params(gx_device * dev, gs_param_list * plist)
^

./devices/gdevpdfimg.c:1261:5: warning: no previous prototype for function 'gdev_PCLm_begin_page' [-Wmissing-prototypes]
int gdev_PCLm_begin_page(gx_device_pdf_image *pdf_dev,
    ^

./devices/gdevpdfimg.c:1289:34: warning: incompatible integer to pointer conversion assigning to 'gsicc_link_t *' (aka 'struct gsicc_link_s *') from 'int' [-Wint-conversion]
                pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

./devices/gdevpdfimg.c:1293:34: warning: incompatible integer to pointer conversion assigning to 'gsicc_link_t *' (aka 'struct gsicc_link_s *') from 'int' [-Wint-conversion]
                pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

./devices/gdevpdfimg.c:1297:34: warning: incompatible integer to pointer conversion assigning to 'gsicc_link_t *' (aka 'struct gsicc_link_s *') from 'int' [-Wint-conversion]
                pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

./devices/gdevpdfimg.c:1341:1: warning: no previous prototype for function 'PCLm_downscale_and_print_page' [-Wmissing-prototypes]
PCLm_downscale_and_print_page(gx_device_printer *dev, int factor,
^

./devices/gdevpdfimg.c:1360:13: warning: unused variable 's' [-Wunused-variable]
    stream *s = pdf_dev->strm;
            ^

./devices/gdevpdfimg.c:1361:11: warning: unused variable 'file' [-Wunused-variable]
    FILE *file;
          ^

./devices/gdevpdfimg.c:1690:79: warning: unused variable 'Creator' [-Wunused-variable]
    char Buffer[1024], CreationDate[26], Title[] = "Untitled", Producer[256], Creator[] = "Ghostscript pdfimage";
                                                                              ^

./devices/gdevpdfimg.c:1694:14: warning: unused variable 'digest' [-Wunused-variable]
        byte digest[6], fileID[16];
             ^

./devices/gdevpdfimg.c:193:5: warning: no previous prototype for function 'gdev_pdf_image_begin_page' [-Wmissing-prototypes]
int gdev_pdf_image_begin_page(gx_device_pdf_image *pdf_dev,
    ^

./devices/gdevpdfimg.c:221:34: warning: incompatible integer to pointer conversion assigning to 'gsicc_link_t *' (aka 'struct gsicc_link_s *') from 'int' [-Wint-conversion]
                pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

./devices/gdevpdfimg.c:221:36: warning: implicit declaration of function 'gsicc_alloc_link_dev' is invalid in C99 [-Wimplicit-function-declaration]
                pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                   ^

./devices/gdevpdfimg.c:225:34: warning: incompatible integer to pointer conversion assigning to 'gsicc_link_t *' (aka 'struct gsicc_link_s *') from 'int' [-Wint-conversion]
                pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

./devices/gdevpdfimg.c:229:34: warning: incompatible integer to pointer conversion assigning to 'gsicc_link_t *' (aka 'struct gsicc_link_s *') from 'int' [-Wint-conversion]
                pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

./devices/gdevpdfimg.c:236:17: warning: implicit declaration of function 'gsicc_free_link_dev' is invalid in C99 [-Wimplicit-function-declaration]
                gsicc_free_link_dev(pdev->memory, pdf_dev->icclink);
                ^

./devices/gdevpdfimg.c:279:5: warning: implicit declaration of function 'gsicc_init_buffer' is invalid in C99 [-Wimplicit-function-declaration]
    gsicc_init_buffer(&input_buffer_desc, icclink->num_input, 1, false,
    ^

./devices/gdevpdfimg.c:317:21: warning: implicit declaration of function 'gs_jpeg_create_compress' is invalid in C99 [-Wimplicit-function-declaration]
        if ((code = gs_jpeg_create_compress(sDCT)) < 0) {
                    ^

./devices/gdevpdfimg.c:318:13: warning: implicit declaration of function 'gs_jpeg_destroy' is invalid in C99 [-Wimplicit-function-declaration]
            gs_jpeg_destroy(sDCT);
            ^

./devices/gdevpdfimg.c:342:21: warning: implicit declaration of function 'gs_jpeg_set_defaults' is invalid in C99 [-Wimplicit-function-declaration]
        if ((code = gs_jpeg_set_defaults(sDCT)) < 0) {
                    ^

./devices/gdevpdfimg.c:349:20: warning: implicit declaration of function 'gs_jpeg_set_quality' is invalid in C99 [-Wimplicit-function-declaration]
            code = gs_jpeg_set_quality(sDCT, pdf_dev->JPEGQ, TRUE);
                   ^

./devices/gdevpdfimg.c:357:20: warning: implicit declaration of function 'gs_jpeg_set_linear_quality' is invalid in C99 [-Wimplicit-function-declaration]
            code = gs_jpeg_set_linear_quality(sDCT,
                   ^

./devices/gdevpdfimg.c:402:1: warning: no previous prototype for function 'pdf_image_downscale_and_print_page' [-Wmissing-prototypes]
pdf_image_downscale_and_print_page(gx_device_printer *dev, int factor,
^

./devices/gdevpdfimg.c:627:6: warning: no previous prototype for function 'write_xref_entry' [-Wmissing-prototypes]
void write_xref_entry (stream *s, gs_offset_t Offset)
     ^

./devices/gdevpdfimg.c:710:12: warning: unused function 'write_xml' [-Wunused-function]
static int write_xml(gx_device_pdf_image *pdev, stream *s, char *Title, char *Producer, char *Creator, struct tm *tms, char timesign, int timeoffset, byte digest[6])
           ^

./devices/gdevpdfimg.c:712:48: warning: unused variable 'cre_date_time' [-Wunused-variable]
    char instance_uuid[45], document_uuid[45], cre_date_time[40], mod_date_time[40], date_time_buf[40];
                                               ^

./devices/gdevpdfimg.c:712:67: warning: unused variable 'mod_date_time' [-Wunused-variable]
    char instance_uuid[45], document_uuid[45], cre_date_time[40], mod_date_time[40], date_time_buf[40];
                                                                  ^

./devices/gdevpdfimg.c:712:86: warning: unused variable 'date_time_buf' [-Wunused-variable]
    char instance_uuid[45], document_uuid[45], cre_date_time[40], mod_date_time[40], date_time_buf[40];
                                                                                     ^

./devices/gdevpdfimg.c:771:13: warning: unused variable 'strm' [-Wunused-variable]
    stream *strm = pdev->strm;
            ^

./devices/gdevpdfimg.c:773:9: warning: unused variable 'code' [-Wunused-variable]
    int code;
        ^

./devices/gdevpdfimg.c:799:6: warning: no previous prototype for function 'write_fileID' [-Wmissing-prototypes]
void write_fileID(stream *s, const byte *str, int size)
     ^

./devices/gdevpdfimg.c:846:65: warning: unused variable 'Creator' [-Wunused-variable]
    char CreationDate[26], Title[] = "Untitled", Producer[256], Creator[] = "Ghostscript pdfimage";
                                                                ^

./devices/gdevpdfimg.c:847:17: warning: unused variable 'streamsize' [-Wunused-variable]
    gs_offset_t streamsize;
                ^

./devices/gdevpdfimg.c:850:14: warning: unused variable 'digest' [-Wunused-variable]
        byte digest[6], fileID[16];
             ^

./devices/gdevpdfimg.c:90:13: warning: unused variable 'PDFDocEncodingLookup' [-Wunused-variable]
static char PDFDocEncodingLookup [92] = {
            ^

./devices/gdevpdfimg.c:930:1: warning: no previous prototype for function 'pdf_image_compression_param_string' [-Wmissing-prototypes]
pdf_image_compression_param_string(gs_param_string *param, unsigned char id)
^

./devices/gdevpdfimg.c:942:1: warning: no previous prototype for function 'pdf_image_compression_id' [-Wmissing-prototypes]
pdf_image_compression_id(unsigned char *id, gs_param_string *param)
^

./devices/gdevpdfimg.c:987:1: warning: no previous prototype for function 'pdf_image_get_params' [-Wmissing-prototypes]
pdf_image_get_params(gx_device * dev, gs_param_list * plist)
^


http://miles.ghostscript.com:8080/artifex/7a13371ec8dc077c4a3b28f6935206fe06fc534e/gs-clang-warnings.txt



new scan-build warnings:

./devices/gdevpdfimg.c:106:12: warning: 'pdf_image_set_icc_color_fields' declared 'static' but never defined [-Wunused-function]
 static int pdf_image_set_icc_color_fields(gx_device_printer *pdev);
            ^

./devices/gdevpdfimg.c:1077:1: warning: no previous prototype for 'pdf_image_put_params' [-Wmissing-prototypes]
 pdf_image_put_params(gx_device * dev, gs_param_list * plist)
 ^

./devices/gdevpdfimg.c:1261:5: warning: no previous prototype for 'gdev_PCLm_begin_page' [-Wmissing-prototypes]
 int gdev_PCLm_begin_page(gx_device_pdf_image *pdf_dev,
     ^

./devices/gdevpdfimg.c:1289:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
                 pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                  ^

./devices/gdevpdfimg.c:1293:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
                 pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                  ^

./devices/gdevpdfimg.c:1297:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
                 pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                  ^

./devices/gdevpdfimg.c:1341:1: warning: no previous prototype for 'PCLm_downscale_and_print_page' [-Wmissing-prototypes]
 PCLm_downscale_and_print_page(gx_device_printer *dev, int factor,
 ^

./devices/gdevpdfimg.c:1360:13: warning: Value stored to 's' during its initialization is never read
    stream *s = pdf_dev->strm;
            ^   ~~~~~~~~~~~~~

./devices/gdevpdfimg.c:1360:13: warning: unused variable 's' [-Wunused-variable]
     stream *s = pdf_dev->strm;
             ^

./devices/gdevpdfimg.c:1361:11: warning: unused variable 'file' [-Wunused-variable]
     FILE *file;
           ^

./devices/gdevpdfimg.c:1690:79: warning: unused variable 'Creator' [-Wunused-variable]
     char Buffer[1024], CreationDate[26], Title[] = "Untitled", Producer[256], Creator[] = "Ghostscript pdfimage";
                                                                               ^

./devices/gdevpdfimg.c:1694:14: warning: unused variable 'digest' [-Wunused-variable]
         byte digest[6], fileID[16];
              ^

./devices/gdevpdfimg.c:193:5: warning: no previous prototype for 'gdev_pdf_image_begin_page' [-Wmissing-prototypes]
 int gdev_pdf_image_begin_page(gx_device_pdf_image *pdf_dev,
     ^

./devices/gdevpdfimg.c:221:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
                 pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                  ^

./devices/gdevpdfimg.c:221:36: warning: implicit declaration of function 'gsicc_alloc_link_dev' [-Wimplicit-function-declaration]
                 pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                    ^

./devices/gdevpdfimg.c:225:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
                 pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                  ^

./devices/gdevpdfimg.c:229:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
                 pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                  ^

./devices/gdevpdfimg.c:236:17: warning: implicit declaration of function 'gsicc_free_link_dev' [-Wimplicit-function-declaration]
                 gsicc_free_link_dev(pdev->memory, pdf_dev->icclink);
                 ^

./devices/gdevpdfimg.c:279:5: warning: implicit declaration of function 'gsicc_init_buffer' [-Wimplicit-function-declaration]
     gsicc_init_buffer(&input_buffer_desc, icclink->num_input, 1, false,
     ^

./devices/gdevpdfimg.c:317:21: warning: implicit declaration of function 'gs_jpeg_create_compress' [-Wimplicit-function-declaration]
         if ((code = gs_jpeg_create_compress(sDCT)) < 0) {
                     ^

./devices/gdevpdfimg.c:318:13: warning: implicit declaration of function 'gs_jpeg_destroy' [-Wimplicit-function-declaration]
             gs_jpeg_destroy(sDCT);
             ^

./devices/gdevpdfimg.c:342:21: warning: implicit declaration of function 'gs_jpeg_set_defaults' [-Wimplicit-function-declaration]
         if ((code = gs_jpeg_set_defaults(sDCT)) < 0) {
                     ^

./devices/gdevpdfimg.c:349:20: warning: implicit declaration of function 'gs_jpeg_set_quality' [-Wimplicit-function-declaration]
             code = gs_jpeg_set_quality(sDCT, pdf_dev->JPEGQ, TRUE);
                    ^

./devices/gdevpdfimg.c:357:20: warning: implicit declaration of function 'gs_jpeg_set_linear_quality' [-Wimplicit-function-declaration]
             code = gs_jpeg_set_linear_quality(sDCT,
                    ^

./devices/gdevpdfimg.c:402:1: warning: no previous prototype for 'pdf_image_downscale_and_print_page' [-Wmissing-prototypes]
 pdf_image_downscale_and_print_page(gx_device_printer *dev, int factor,
 ^

./devices/gdevpdfimg.c:627:6: warning: no previous prototype for 'write_xref_entry' [-Wmissing-prototypes]
 void write_xref_entry (stream *s, gs_offset_t Offset)
      ^

./devices/gdevpdfimg.c:710:12: warning: 'write_xml' defined but not used [-Wunused-function]
 static int write_xml(gx_device_pdf_image *pdev, stream *s, char *Title, char *Producer, char *Creator, struct tm *tms, char timesign, int timeoffset, byte digest[6])
            ^

./devices/gdevpdfimg.c:712:48: warning: unused variable 'cre_date_time' [-Wunused-variable]
     char instance_uuid[45], document_uuid[45], cre_date_time[40], mod_date_time[40], date_time_buf[40];
                                                ^

./devices/gdevpdfimg.c:712:67: warning: unused variable 'mod_date_time' [-Wunused-variable]
     char instance_uuid[45], document_uuid[45], cre_date_time[40], mod_date_time[40], date_time_buf[40];
                                                                   ^

./devices/gdevpdfimg.c:712:86: warning: unused variable 'date_time_buf' [-Wunused-variable]
     char instance_uuid[45], document_uuid[45], cre_date_time[40], mod_date_time[40], date_time_buf[40];
                                                                                      ^

./devices/gdevpdfimg.c:771:13: warning: Value stored to 'strm' during its initialization is never read
    stream *strm = pdev->strm;
            ^~~~   ~~~~~~~~~~

./devices/gdevpdfimg.c:771:13: warning: unused variable 'strm' [-Wunused-variable]
     stream *strm = pdev->strm;
             ^

./devices/gdevpdfimg.c:773:9: warning: unused variable 'code' [-Wunused-variable]
     int code;
         ^

./devices/gdevpdfimg.c:799:6: warning: no previous prototype for 'write_fileID' [-Wmissing-prototypes]
 void write_fileID(stream *s, const byte *str, int size)
      ^

./devices/gdevpdfimg.c:846:65: warning: unused variable 'Creator' [-Wunused-variable]
     char CreationDate[26], Title[] = "Untitled", Producer[256], Creator[] = "Ghostscript pdfimage";
                                                                 ^

./devices/gdevpdfimg.c:847:17: warning: unused variable 'streamsize' [-Wunused-variable]
     gs_offset_t streamsize;
                 ^

./devices/gdevpdfimg.c:850:14: warning: unused variable 'digest' [-Wunused-variable]
         byte digest[6], fileID[16];
              ^

./devices/gdevpdfimg.c:90:13: warning: 'PDFDocEncodingLookup' defined but not used [-Wunused-variable]
 static char PDFDocEncodingLookup [92] = {
             ^

./devices/gdevpdfimg.c:930:1: warning: no previous prototype for 'pdf_image_compression_param_string' [-Wmissing-prototypes]
 pdf_image_compression_param_string(gs_param_string *param, unsigned char id)
 ^

./devices/gdevpdfimg.c:942:1: warning: no previous prototype for 'pdf_image_compression_id' [-Wmissing-prototypes]
 pdf_image_compression_id(unsigned char *id, gs_param_string *param)
 ^

./devices/gdevpdfimg.c:960:9: warning: Value stored to 'ecode' during its initialization is never read
    int ecode = code;
        ^~~~~   ~~~~

./devices/gdevpdfimg.c:987:1: warning: no previous prototype for 'pdf_image_get_params' [-Wmissing-prototypes]
 pdf_image_get_params(gx_device * dev, gs_param_list * plist)
 ^


http://miles.ghostscript.com:8080/artifex/7a13371ec8dc077c4a3b28f6935206fe06fc534e/gs/index.html

http://miles.ghostscript.com:8080/artifex/7a13371ec8dc077c4a3b28f6935206fe06fc534e/gs-scan-build.txt




GhostPCL:

new gcc warnings (gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609): 

./devices/gdevpdfimg.c:106:12: warning: 'pdf_image_set_icc_color_fields' declared 'static' but never defined [-Wunused-function]
./devices/gdevpdfimg.c:1077:1: warning: no previous prototype for 'pdf_image_put_params' [-Wmissing-prototypes]
./devices/gdevpdfimg.c:1261:5: warning: no previous prototype for 'gdev_PCLm_begin_page' [-Wmissing-prototypes]
./devices/gdevpdfimg.c:1289:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
./devices/gdevpdfimg.c:1293:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
./devices/gdevpdfimg.c:1297:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
./devices/gdevpdfimg.c:1341:1: warning: no previous prototype for 'PCLm_downscale_and_print_page' [-Wmissing-prototypes]
./devices/gdevpdfimg.c:1360:13: warning: unused variable 's' [-Wunused-variable]
./devices/gdevpdfimg.c:1361:11: warning: unused variable 'file' [-Wunused-variable]
./devices/gdevpdfimg.c:1690:79: warning: unused variable 'Creator' [-Wunused-variable]
./devices/gdevpdfimg.c:1694:14: warning: unused variable 'digest' [-Wunused-variable]
./devices/gdevpdfimg.c:193:5: warning: no previous prototype for 'gdev_pdf_image_begin_page' [-Wmissing-prototypes]
./devices/gdevpdfimg.c:221:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
./devices/gdevpdfimg.c:221:36: warning: implicit declaration of function 'gsicc_alloc_link_dev' [-Wimplicit-function-declaration]
./devices/gdevpdfimg.c:225:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
./devices/gdevpdfimg.c:229:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
./devices/gdevpdfimg.c:236:17: warning: implicit declaration of function 'gsicc_free_link_dev' [-Wimplicit-function-declaration]
./devices/gdevpdfimg.c:279:5: warning: implicit declaration of function 'gsicc_init_buffer' [-Wimplicit-function-declaration]
./devices/gdevpdfimg.c:317:21: warning: implicit declaration of function 'gs_jpeg_create_compress' [-Wimplicit-function-declaration]
./devices/gdevpdfimg.c:318:13: warning: implicit declaration of function 'gs_jpeg_destroy' [-Wimplicit-function-declaration]
./devices/gdevpdfimg.c:342:21: warning: implicit declaration of function 'gs_jpeg_set_defaults' [-Wimplicit-function-declaration]
./devices/gdevpdfimg.c:349:20: warning: implicit declaration of function 'gs_jpeg_set_quality' [-Wimplicit-function-declaration]
./devices/gdevpdfimg.c:357:20: warning: implicit declaration of function 'gs_jpeg_set_linear_quality' [-Wimplicit-function-declaration]
./devices/gdevpdfimg.c:402:1: warning: no previous prototype for 'pdf_image_downscale_and_print_page' [-Wmissing-prototypes]
./devices/gdevpdfimg.c:627:6: warning: no previous prototype for 'write_xref_entry' [-Wmissing-prototypes]
./devices/gdevpdfimg.c:710:12: warning: 'write_xml' defined but not used [-Wunused-function]
./devices/gdevpdfimg.c:712:48: warning: unused variable 'cre_date_time' [-Wunused-variable]
./devices/gdevpdfimg.c:712:67: warning: unused variable 'mod_date_time' [-Wunused-variable]
./devices/gdevpdfimg.c:712:86: warning: unused variable 'date_time_buf' [-Wunused-variable]
./devices/gdevpdfimg.c:771:13: warning: unused variable 'strm' [-Wunused-variable]
./devices/gdevpdfimg.c:773:9: warning: unused variable 'code' [-Wunused-variable]
./devices/gdevpdfimg.c:799:6: warning: no previous prototype for 'write_fileID' [-Wmissing-prototypes]
./devices/gdevpdfimg.c:846:65: warning: unused variable 'Creator' [-Wunused-variable]
./devices/gdevpdfimg.c:847:17: warning: unused variable 'streamsize' [-Wunused-variable]
./devices/gdevpdfimg.c:850:14: warning: unused variable 'digest' [-Wunused-variable]
./devices/gdevpdfimg.c:90:13: warning: 'PDFDocEncodingLookup' defined but not used [-Wunused-variable]
./devices/gdevpdfimg.c:930:1: warning: no previous prototype for 'pdf_image_compression_param_string' [-Wmissing-prototypes]
./devices/gdevpdfimg.c:942:1: warning: no previous prototype for 'pdf_image_compression_id' [-Wmissing-prototypes]
./devices/gdevpdfimg.c:987:1: warning: no previous prototype for 'pdf_image_get_params' [-Wmissing-prototypes]

http://miles.ghostscript.com:8080/artifex/7a13371ec8dc077c4a3b28f6935206fe06fc534e/pcl-gcc-warnings.txt



new scan-build warnings:

./devices/gdevpdfimg.c:106:12: warning: 'pdf_image_set_icc_color_fields' declared 'static' but never defined [-Wunused-function]
 static int pdf_image_set_icc_color_fields(gx_device_printer *pdev);
            ^

./devices/gdevpdfimg.c:1077:1: warning: no previous prototype for 'pdf_image_put_params' [-Wmissing-prototypes]
 pdf_image_put_params(gx_device * dev, gs_param_list * plist)
 ^

./devices/gdevpdfimg.c:1261:5: warning: no previous prototype for 'gdev_PCLm_begin_page' [-Wmissing-prototypes]
 int gdev_PCLm_begin_page(gx_device_pdf_image *pdf_dev,
     ^

./devices/gdevpdfimg.c:1289:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
                 pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                  ^

./devices/gdevpdfimg.c:1293:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
                 pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                  ^

./devices/gdevpdfimg.c:1297:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
                 pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                  ^

./devices/gdevpdfimg.c:1341:1: warning: no previous prototype for 'PCLm_downscale_and_print_page' [-Wmissing-prototypes]
 PCLm_downscale_and_print_page(gx_device_printer *dev, int factor,
 ^

./devices/gdevpdfimg.c:1360:13: warning: Value stored to 's' during its initialization is never read
    stream *s = pdf_dev->strm;
            ^   ~~~~~~~~~~~~~

./devices/gdevpdfimg.c:1360:13: warning: unused variable 's' [-Wunused-variable]
     stream *s = pdf_dev->strm;
             ^

./devices/gdevpdfimg.c:1361:11: warning: unused variable 'file' [-Wunused-variable]
     FILE *file;
           ^

./devices/gdevpdfimg.c:1690:79: warning: unused variable 'Creator' [-Wunused-variable]
     char Buffer[1024], CreationDate[26], Title[] = "Untitled", Producer[256], Creator[] = "Ghostscript pdfimage";
                                                                               ^

./devices/gdevpdfimg.c:1694:14: warning: unused variable 'digest' [-Wunused-variable]
         byte digest[6], fileID[16];
              ^

./devices/gdevpdfimg.c:193:5: warning: no previous prototype for 'gdev_pdf_image_begin_page' [-Wmissing-prototypes]
 int gdev_pdf_image_begin_page(gx_device_pdf_image *pdf_dev,
     ^

./devices/gdevpdfimg.c:221:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
                 pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                  ^

./devices/gdevpdfimg.c:221:36: warning: implicit declaration of function 'gsicc_alloc_link_dev' [-Wimplicit-function-declaration]
                 pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                    ^

./devices/gdevpdfimg.c:225:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
                 pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                  ^

./devices/gdevpdfimg.c:229:34: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
                 pdf_dev->icclink = gsicc_alloc_link_dev(pdev->memory,
                                  ^

./devices/gdevpdfimg.c:236:17: warning: implicit declaration of function 'gsicc_free_link_dev' [-Wimplicit-function-declaration]
                 gsicc_free_link_dev(pdev->memory, pdf_dev->icclink);
                 ^

./devices/gdevpdfimg.c:279:5: warning: implicit declaration of function 'gsicc_init_buffer' [-Wimplicit-function-declaration]
     gsicc_init_buffer(&input_buffer_desc, icclink->num_input, 1, false,
     ^

./devices/gdevpdfimg.c:317:21: warning: implicit declaration of function 'gs_jpeg_create_compress' [-Wimplicit-function-declaration]
         if ((code = gs_jpeg_create_compress(sDCT)) < 0) {
                     ^

./devices/gdevpdfimg.c:318:13: warning: implicit declaration of function 'gs_jpeg_destroy' [-Wimplicit-function-declaration]
             gs_jpeg_destroy(sDCT);
             ^

./devices/gdevpdfimg.c:342:21: warning: implicit declaration of function 'gs_jpeg_set_defaults' [-Wimplicit-function-declaration]
         if ((code = gs_jpeg_set_defaults(sDCT)) < 0) {
                     ^

./devices/gdevpdfimg.c:349:20: warning: implicit declaration of function 'gs_jpeg_set_quality' [-Wimplicit-function-declaration]
             code = gs_jpeg_set_quality(sDCT, pdf_dev->JPEGQ, TRUE);
                    ^

./devices/gdevpdfimg.c:357:20: warning: implicit declaration of function 'gs_jpeg_set_linear_quality' [-Wimplicit-function-declaration]
             code = gs_jpeg_set_linear_quality(sDCT,
                    ^

./devices/gdevpdfimg.c:402:1: warning: no previous prototype for 'pdf_image_downscale_and_print_page' [-Wmissing-prototypes]
 pdf_image_downscale_and_print_page(gx_device_printer *dev, int factor,
 ^

./devices/gdevpdfimg.c:627:6: warning: no previous prototype for 'write_xref_entry' [-Wmissing-prototypes]
 void write_xref_entry (stream *s, gs_offset_t Offset)
      ^

./devices/gdevpdfimg.c:710:12: warning: 'write_xml' defined but not used [-Wunused-function]
 static int write_xml(gx_device_pdf_image *pdev, stream *s, char *Title, char *Producer, char *Creator, struct tm *tms, char timesign, int timeoffset, byte digest[6])
            ^

./devices/gdevpdfimg.c:712:48: warning: unused variable 'cre_date_time' [-Wunused-variable]
     char instance_uuid[45], document_uuid[45], cre_date_time[40], mod_date_time[40], date_time_buf[40];
                                                ^

./devices/gdevpdfimg.c:712:67: warning: unused variable 'mod_date_time' [-Wunused-variable]
     char instance_uuid[45], document_uuid[45], cre_date_time[40], mod_date_time[40], date_time_buf[40];
                                                                   ^

./devices/gdevpdfimg.c:712:86: warning: unused variable 'date_time_buf' [-Wunused-variable]
     char instance_uuid[45], document_uuid[45], cre_date_time[40], mod_date_time[40], date_time_buf[40];
                                                                                      ^

./devices/gdevpdfimg.c:771:13: warning: Value stored to 'strm' during its initialization is never read
    stream *strm = pdev->strm;
            ^~~~   ~~~~~~~~~~

./devices/gdevpdfimg.c:771:13: warning: unused variable 'strm' [-Wunused-variable]
     stream *strm = pdev->strm;
             ^

./devices/gdevpdfimg.c:773:9: warning: unused variable 'code' [-Wunused-variable]
     int code;
         ^

./devices/gdevpdfimg.c:799:6: warning: no previous prototype for 'write_fileID' [-Wmissing-prototypes]
 void write_fileID(stream *s, const byte *str, int size)
      ^

./devices/gdevpdfimg.c:846:65: warning: unused variable 'Creator' [-Wunused-variable]
     char CreationDate[26], Title[] = "Untitled", Producer[256], Creator[] = "Ghostscript pdfimage";
                                                                 ^

./devices/gdevpdfimg.c:847:17: warning: unused variable 'streamsize' [-Wunused-variable]
     gs_offset_t streamsize;
                 ^

./devices/gdevpdfimg.c:850:14: warning: unused variable 'digest' [-Wunused-variable]
         byte digest[6], fileID[16];
              ^

./devices/gdevpdfimg.c:90:13: warning: 'PDFDocEncodingLookup' defined but not used [-Wunused-variable]
 static char PDFDocEncodingLookup [92] = {
             ^

./devices/gdevpdfimg.c:930:1: warning: no previous prototype for 'pdf_image_compression_param_string' [-Wmissing-prototypes]
 pdf_image_compression_param_string(gs_param_string *param, unsigned char id)
 ^

./devices/gdevpdfimg.c:942:1: warning: no previous prototype for 'pdf_image_compression_id' [-Wmissing-prototypes]
 pdf_image_compression_id(unsigned char *id, gs_param_string *param)
 ^

./devices/gdevpdfimg.c:960:9: warning: Value stored to 'ecode' during its initialization is never read
    int ecode = code;
        ^~~~~   ~~~~

./devices/gdevpdfimg.c:987:1: warning: no previous prototype for 'pdf_image_get_params' [-Wmissing-prototypes]
 pdf_image_get_params(gx_device * dev, gs_param_list * plist)
 ^


http://miles.ghostscript.com:8080/artifex/7a13371ec8dc077c4a3b28f6935206fe06fc534e/pcl/index.html

http://miles.ghostscript.com:8080/artifex/7a13371ec8dc077c4a3b28f6935206fe06fc534e/pcl-scan-build.txt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.