Ticket #13913: 0001-bin-compress-Mark-functions-not-returning-values-as-.patch

File 0001-bin-compress-Mark-functions-not-returning-values-as-.patch, 1.8 KB (added by tuankiet65, 6 years ago)
  • src/bin/compress/compress.c

    From 26a110af7209b8d3c1270cbd2ce31562b79dc6e5 Mon Sep 17 00:00:00 2001
    From: Ho Tuan Kiet <tuankiet65@gmail.com>
    Date: Fri, 29 Dec 2017 22:45:39 +0700
    Subject: [PATCH 1/3] bin/compress: Mark functions not returning values as void
    
    Some functions which don't return values aren't prefixed with a return type so they default to int, not void and Coverity freaks out about them. This patch adds a "void" prefix to those functions.
    
    Coverity CID: 603424
    Coverity CID: 603425
    Coverity CID: 603426
    Coverity CID: 603427
    Coverity CID: 603428
    Coverity CID: 603432
    ---
     src/bin/compress/compress.c | 6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/src/bin/compress/compress.c b/src/bin/compress/compress.c
    index b68283cc11..26e3125acc 100644
    a b int exit_stat = 0;  
    435435
    436436code_int getcode();
    437437
     438void
    438439Usage() {
    439440#ifdef DEBUG
    440441
    char_type lmask[9] = {0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00};  
    10941095char_type rmask[9] = {0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff};
    10951096#endif /* vax */
    10961097
     1098void
    10971099output( code )
    10981100code_int  code;
    10991101{
    oops ( ) /* wild pointer -- assume bad input */  
    16241626}
    16251627#endif /* MSDOS */
    16261628
     1629void
    16271630cl_block ()     /* table clear for block compress */
    16281631{
    16291632    register long int rat;
    cl_block () /* table clear for block compress */  
    16661669    }
    16671670}
    16681671
     1672void
    16691673cl_hash(hsize)      /* reset code table */
    16701674    register count_int hsize;
    16711675{
    cl_hash(hsize) /* reset code table */  
    17261730        *--htab_p = m1;
    17271731}
    17281732
     1733void
    17291734prratio(stream, num, den)
    17301735FILE *stream;
    17311736long int num, den;
    long int num, den;  
    17491754    fprintf(stream, "%d.%02d%%", (int)(q / 100), (int)(q % 100));
    17501755}
    17511756
     1757void
    17521758version()
    17531759{
    17541760    fprintf(stderr, "%s\n", rcs_ident);