G'day,

Antonio mentioned he was hoping to release an updated set
of packages for the Tecgraf scientific/technical tools --
particularly IUP.

I've decided to work on preparing "lglicua-0.1-alpha7"
release to go on SourceForge, that picks up the latest tools
such as Lua 5.4.4 and LuaRocks 3.9.1, as well as expanding
the GNU/Linux platforms that it handles (including kernel
6.x,y, and both gcc-11.x and gcc-12.x).

When I looked at the diagnostic output, I noticed
significant duplication, due to a few header files that
contained warnings, being #included by multiple C/C++
sources.

So, I've reworked the script to remove duplicates.  The
result is that some report summaries are less than half
their former size.

---------

Attached are the warnings for IM-r820, under gcc 12.

(Others will follow: pdflib7, ftgl, cd, iup.)

--

cheers,
sur-behoffski (Brenton Hoff)
programmer, Grouse Software
* No diagnostics for:
    #include expects "FILENAME" or <FILENAME>
    missing binary operator before token "("
    the comparison will always evaluate as 'true' for the address of <VAR> will 
never be NULL [-Waddress]
    <FUNC> forming offset <BYTECOUNT1> is out of the bounds [<BYTECOUNT2>, 
<BYTECOUNT3>] of object <VAR> with type <TYPE> [-Warray-bounds]
    array subscript <TYPE1> is partly outside array bounds of <TYPE2> 
[-Warray-bounds]
    <FUNC> clearing an object of non-trivial type <TYPE1> {aka <TYPE2>}; use 
assignment or value-initialization instead [-Wclass-memaccess]
    <FUNC> clearing an object of type <TYPE1> {aka <TYPE2>} with no trivial 
copy-assignment; use assignment or value-initialization instead 
[-Wclass-memaccess]
    <FUNC> moving an object of non-trivially copyable type <TYPE1> {aka 
<TYPE2>}; use 'new' and 'delete' instead [-Wclass-memaccess]
    <FUNC> writing to an object of type <TYPE> with no trivial copy-assignment; 
use copy-assignment or copy-initialization instead [-Wclass-memaccess]
    converting to non-pointer type <TYPE> from NULL [-Wconversion-null]
    <FUNC> is deprecated [-Wdeprecated-declarations]
    <FUNC1> is deprecated: Use <FUNC2> instead [-Wdeprecated-declarations]
    assignment discards <TYPE> qualifier from pointer target type 
[-Wdiscarded-qualifiers]
    comparison between <ENUM1> and <ENUM2> [-Wenum-compare]
    comparison between <ENUM1> {aka <ENUM2>} and <ENUM3> {aka <ENUM4>} 
[-Wenum-compare]
    format <FMT> expects argument of type <TYPE1>, but argument <NUM> has type 
<TYPE2> [-Wformat=]
    too many arguments for format [-Wformat-extra-args]
    <FUNC> may write a terminating nul past the end of the destination 
[-Wformat-overflow=]
    <DIRECTIVE> directive writing 1 byte into a region of size between 0 and 
<BYTECOUNT> [-Wformat-overflow=]
    <DIRECTIVE> directive writing <BYTECOUNT1> bytes into a region of size 
between <BYTECOUNT2> and <BYTECOUNT3> [-Wformat-overflow=]
    <DIRECTIVE> directive writing up to <BYTECOUNT1> bytes into a region of 
size between <BYTECOUNT2> and <BYTECOUNT3> [-Wformat-overflow=]
    <DIRECTIVE> directive writing between <BYTECOUNT1> and <BYTECOUNT2> bytes 
into a region of size between <BYTECOUNT3> and <BYTECOUNT4> [-Wformat-overflow=]
    <DIRECTIVE> directive writing up to <BYTECOUNT1> bytes into a region of 
size <BYTECOUNT2> [-Wformat-overflow=]
    <DIRECTIVE> directive output may be truncated writing <BYTECOUNT1> bytes 
into a region of size between <BYTECOUNT2> and <BYTECOUNT3> 
[-Wformat-truncation=]
    <FUNC> output may be truncated before the last format character 
[-Wformat-truncation=]
    format not a string literal and no format arguments [-Wformat-security]
    <DIRECTIVE> directive output may be truncated writing up to <BYTECOUNT1> 
bytes into a region of size <BYTECOUNT2> [-Wformat-truncation=]
    <DIRECTIVE> directive output may be truncated writing up to <BYTECOUNT1> 
bytes into a region of size between <BYTECOUNT2> and <BYTECOUNT3> 
[-Wformat-truncation=]
    assignment from incompatible pointer type [-Wincompatible-pointer-types]
    assignment to <TYPE1> from incompatible pointer type <TYPE2> 
[-Wincompatible-pointer-types]
    assignment to <TYPE1> {aka <TYPE2>} from incompatible pointer type <TYPE3> 
{aka <TYPE4>} [-Wincompatible-pointer-types]
    assignment to <TYPE1> from incompatible pointer type <TYPE2> {aka <TYPE3>} 
[-Wincompatible-pointer-types]
    initialization from incompatible pointer type [-Wincompatible-pointer-types]
    initialization of <TYPE1> {aka <TYPE2>} from incompatible pointer type 
<TYPE3> {aka <TYPE4>} [-Wincompatible-pointer-types]
    passing argument <NUM> of <FUNC> from incompatible pointer type 
[-Wincompatible-pointer-types]
    <VAR> is usually a function [-Wmain]
    <VAR> may be used uninitialized [-Wmaybe-uninitialized]
    <VAR> may be used uninitialized in this function [-Wmaybe-uninitialized]
    missing braces around initializer [-Wmissing-braces]
    the use of `tmpnam' is dangerous, better use `mkstemp'
    suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
    suggest parentheses around assignment used as truth value [-Wparentheses]
    suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
    suggest parentheses around '&&' within '||' [-Wparentheses]
    cast from pointer to integer of different size [-Wpointer-to-int-cast]
    <FUNC> argument <NUM> overlaps destination object <VAR> [-Wrestrict]
    passing argument <NUM1> to restrict-qualified parameter aliases with 
argument <NUM2> [-Wrestrict]
    no return statement in function returning non-void [-Wreturn-type]
    control reaches end of non-void function [-Wreturn-type]
    this 'else' clause does not guard... [-Wmisleading-indentation]
    this 'for' clause does not guard... [-Wmisleading-indentation]
    this 'if' clause does not guard... [-Wmisleading-indentation]
    this 'while' clause does not guard... [-Wmisleading-indentation]
    comparison between signed and unsigned integer expressions [-Wsign-compare]
    comparison of integer expressions of different signedness: <TYPE1> and 
<TYPE2> [-Wsign-compare]
    comparison of integer expressions of different signedness: <TYPE1> and 
<TYPE2> {aka <TYPE3>} [-Wsign-compare]
    <FUNC> specified bound depends on the length of the source argument 
[-Wstringop-overflow=]
    <FUNC> specified bound depends on the length of the source argument 
[-Wstringop-truncation]
    <FUNC> output truncated before terminating nul copying <BYTECOUNT> bytes 
from a string of the same length [-Wstringop-truncation]
    <FUNC> specified bound <BYTECOUNT> equals destination size 
[-Wstringop-truncation]
    case value <LABEL> not in enumerated type <ENUM1> {aka <ENUM2>} [-Wswitch]
    dereferencing type-punned pointer will break strict-aliasing rules 
[-Wstrict-aliasing]
    enumeration value <ENUM> not handled in switch [-Wswitch]
    <EXPRESSION> is used uninitialized in this function [-Wuninitialized]
    <VAR> is used uninitialized [-Wuninitialized]
    ignoring #pragma omp critical [-Wunknown-pragmas]
    ignoring #pragma omp for [-Wunknown-pragmas]
    ignoring #pragma omp parallel [-Wunknown-pragmas]
    ignoring #pragma omp section [-Wunknown-pragmas]
    ignoring #pragma warning  [-Wunknown-pragmas]
    ignoring <PRAGMA> [-Wunknown-pragmas]
    <VAR> defined but not used [-Wunused-const-variable=]
    <FUNC> declared <TYPE> but never defined [-Wunused-function]
    label <LABEL> defined but not used [-Wunused-label]
    ignoring return value of <FUNC>, declared with attribute warn_unused_result 
[-Wunused-result]
    value computed is not used [-Wunused-value]
    <VAR> defined but not used [-Wunused-variable]
    pointer <VAR> used after <FUNC> [-Wuse-after-free]
    deprecated conversion from string constant to <TYPE> [-Wwrite-strings]
(End of list.)

* Lines that look like warning diagnostics, but we're not sure:
    im_format_jp2.cpp:120: '  'jas_stream_t* imFileFormatJP2::stream' 
[-Wreorder]'
    im_format_jp2.cpp:124: '  when initialized here [-Wreorder]'
    im_format_jp2.cpp:119: '  'int imFileFormatJP2::fmtid' [-Wreorder]'
(End of list.)


argument <NUM> of type <TYPE> with mismatched bound [-Warray-parameter=]:
    libtiff/tif_luv.c:822:18: '1' 'float[3]'
    libtiff/tif_luv.c:976:31: '2' 'float[3]'
    libtiff/tif_luv.c:1004:23: '1' 'float[3]'
    libtiff/tif_luv.c:1117:31: '2' 'float[3]'
    libtiff/tif_luv.c:1142:23: '1' 'float[3]'


argument <NUM> of type <TYPE1> {aka <TYPE2>} with mismatched bound 
[-Warray-parameter=]:
    libtiff/tif_luv.c:822:32: '2' 'uint8[3]' 'unsigned char[3]'


suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]:
    lua5/imlua_process.c:55:6: ('(')
    lua5/imlua_process.c:61:6: ('(')


comparison between <ENUM1> and <ENUM2> {aka <ENUM3>} [-Wenum-compare]:
    libexif/fuji/mnote-fuji-entry.c:233:59: 'ExifTag' 'MnoteFujiTag' 'enum 
_MnoteFujiTag'
    libexif/olympus/mnote-olympus-entry.c:436:59: 'ExifTag' 'MnoteOlympusTag' 
'enum _MnoteOlympusTag'
    libexif/olympus/mnote-olympus-entry.c:506:59: 'ExifTag' 'MnoteOlympusTag' 
'enum _MnoteOlympusTag'
    libexif/pentax/mnote-pentax-entry.c:347:67: 'ExifTag' 'MnotePentaxTag' 
'enum _MnotePentaxTag'
    libexif/pentax/mnote-pentax-entry.c:371:69: 'ExifTag' 'MnotePentaxTag' 
'enum _MnotePentaxTag'


format <FMT> expects argument of type <TYPE1>, but argument <NUM> has type 
<TYPE2> {aka <TYPE3>} [-Wformat=]:
    libexif/canon/exif-mnote-data-canon.c:270:72: '%u' 'unsigned int' '5' 
'size_t' 'long unsigned int'
    libexif/fuji/exif-mnote-data-fuji.c:227:72: '%u' 'unsigned int' '5' 
'size_t' 'long unsigned int'
    libexif/olympus/exif-mnote-data-olympus.c:485:74: '%u' 'unsigned int' '5' 
'size_t' 'long unsigned int'
    libexif/pentax/exif-mnote-data-pentax.c:310:74: '%u' 'unsigned int' '5' 
'size_t' 'long unsigned int'
    libtiff/tif_predict.c:724:26: '%u' 'unsigned int' '4' 'tmsize_t' 'long 
unsigned int'


implicit declaration of function <FUNC> [-Wimplicit-function-declaration]:
    libjasper2/base/jas_stream.c:535:13: 'unlink'


implicit declaration of function <FUNC1>; did you mean <FUNC2>? 
[-Wimplicit-function-declaration]:
    libjasper2/base/jas_stream.c:1334:16: 'read' 'fread'
    libjasper2/base/jas_stream.c:1343:16: 'write' 'fwrite'
    libjasper2/base/jas_stream.c:1352:16: 'lseek' 'fseek'
    libjasper2/base/jas_stream.c:1361:15: 'close' 'pclose'


'*' in boolean context, suggest '&&' instead [-Wint-in-bool-context]:
    libjasper2/jasper/jas_seq.h:286:29: ('* jas_seq2d_height(s))')


cast to pointer from integer of different size [-Wint-to-pointer-cast]:
    im_format_tiff.cpp:773:12: ('(void*)this->tiff->tif_fd')
    tiff_binfile.c:76:36: ('(')


comparison between pointer and zero character constant [-Wpointer-compare]:
    libjasper2/jpc/jpc_util.c:105:32: ('!=')
    libjasper2/jpc/jpc_util.c:123:40: ('!=')


ISO C++17 does not allow 'register' storage class specifier [-Wregister]:
    im_rgb2map.cpp:272:49-114: 'red', 'green', 'blue', 'numpixels'
    im_rgb2map.cpp:274:20: ('histp')
    im_rgb2map.cpp:275:21: ('histogram')
    im_rgb2map.cpp:306:19: ('boxp')
    im_rgb2map.cpp:307:16: ('i')
    im_rgb2map.cpp:308:17: ('maxc')
    im_rgb2map.cpp:322:19: ('boxp')
    im_rgb2map.cpp:323:16: ('i')
    im_rgb2map.cpp:324:16: ('maxv')
    im_rgb2map.cpp:443:19-22: 'b1', 'b2'
    im_rgb2map.cpp:681:18: ('bptr')
    im_rgb2map.cpp:684:16: ('dist2')
    im_rgb2map.cpp:686:16: ('xx2')
    im_rgb2map.cpp:749:21: ('cptr')
    im_rgb2map.cpp:750:20: ('cachep')
    im_rgb2map.cpp:789:23-35: 'cur0', 'cur1', 'cur2'
    im_rgb2map.cpp:792:21: ('errorptr')
    im_rgb2map.cpp:873:22: ('pixcode')
    im_rgb2map.cpp:885:29-39: 'bnexterr', 'delta'


<VAR> will be initialized after [-Wreorder]:
    im_format_jp2.cpp:120:17: 'imFileFormatJP2::stream'
    im_format_jp2.cpp:121:16: 'imFileFormatJP2::image'


case value <LABEL> not in enumerated type <ENUM> [-Wswitch]:
    libexif/exif-entry.c:1224:9: '0' 'ExifTag'
    libexif/exif-entry.c:1251:9: '5' 'ExifTag'
    libexif/exif-entry.c:1264:9: '7' 'ExifTag'


<FUNC> accessing <BYTECOUNT1> bytes in a region of size <BYTECOUNT2> 
[-Wstringop-overflow=]:
    libjasper2/base/jas_cm.c:220:9: 'jas_cmshapmat_invmat' '96' '32'


variable <VAR> set but not used [-Wunused-but-set-variable]:
    libexif/olympus/mnote-olympus-entry.c:349:37: 'd'
    libjasper2/base/jas_icc.c:1080:27: 'txtdesc'
    libjasper2/base/jas_icc.c:1279:24: 'lut8'
    libjasper2/base/jas_image.c:1422:13: 'numinauxchans'
    libjasper2/base/jas_image.c:1429:13: 'numoutchans'
    libjasper2/jp2/jp2_dec.c:108:21: 'cdefd'
    libjasper2/jpc/jpc_dec.c:448:20: 'crg'
    libjasper2/jpc/jpc_dec.c:696:23: 'brcbgyend'
    libjasper2/jpc/jpc_enc.c:875:13: 'e'
    libjasper2/jpc/jpc_enc.c:906:19: 'mctsynweight'
    libjasper2/jpc/jpc_enc.c:1113:13: 'tilex'
    libjasper2/jpc/jpc_enc.c:1114:13: 'tiley'
    libjasper2/jpc/jpc_enc.c:1128:14: 'numbytes'
    libjasper2/jpc/jpc_t1enc.c:200:13: 'ret'
    libjasper2/jpc/jpc_t1enc.c:205:25: 'rlvl'
    libtiff/tif_open.c:104:19: 'n'


<FUNC> defined but not used [-Wunused-function]:
    libjasper2/jasper/jas_math.h:125:13-13: 'jas_int_asr', 'jas_int_asr'
    libjasper2/jasper/jas_math.h:138:13-13: 'jas_int_asl', 'jas_int_asl'
    libjasper2/jasper/jas_math.h:151:13-13: 'jas_fast32_asr', 'jas_fast32_asr'
    libjasper2/jasper/jas_math.h:164:13-13: 'jas_fast32_asl', 'jas_fast32_asl'
    libjasper2/jasper/jas_math.h:195:14-14: 'jas_safe_size_mul3', 
'jas_safe_size_mul3'
    libjasper2/jasper/jas_math.h:210:14-14: 'jas_safe_size_add', 
'jas_safe_size_add'
    libjasper2/jasper/jas_math.h:222:14-14: 'jas_safe_size_sub', 
'jas_safe_size_sub'
    libjasper2/jasper/jas_math.h:271:14-14: 'jas_safe_intfast32_mul3', 
'jas_safe_intfast32_mul3'
    libjasper2/jasper/jas_math.h:286:14-14: 'jas_safe_intfast32_add', 
'jas_safe_intfast32_add'
    libjasper2/jpc/jpc_enc.c:872:12: 'jpc_calcssmant'
    libjasper2/jpc/jpc_enc.c:888:12: 'jpc_calcssexp'


ignoring return value of <FUNC> declared with attribute <ATTRIBUTE> 
[-Wunused-result]:
    libjasper2/base/jas_stream.c:520:9: 'tmpnam' 'warn_unused_result'


statement with no effect [-Wunused-value]:
    ./libexif/i18n.h:46:46: ('(')


unused variable <VAR> [-Wunused-variable]:
    libjasper2/base/jas_image.c:1366:14: 's'
    libjasper2/base/jas_image.c:1367:19: 'tmp'


ISO C++ forbids converting a string constant to <TYPE> [-Wwrite-strings]:
    im_format_tiff.cpp:119:81: 'char*'
    im_format_tiff.cpp:120:81: 'char*'
    im_format_tiff.cpp:121:89: 'char*'
    im_format_tiff.cpp:122:81: 'char*'
    im_format_tiff.cpp:125:89: 'char*'
    im_format_tiff.cpp:126:89: 'char*'
    im_format_tiff.cpp:127:89: 'char*'
    im_format_tiff.cpp:128:89: 'char*'
    im_format_tiff.cpp:129:81: 'char*'
    im_format_tiff.cpp:130:89: 'char*'
    im_format_tiff.cpp:131:88: 'char*'
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to