You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While building iv for NeuroFedora, we noticed a few -Wstrict-aliasing warnings (grepped from the build logs):
make[2]: Entering directory '/builddir/build/BUILD/iv-74f120781bc2def0cc4d1f9f547c07037e8a7a74/src/lib'
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I../include -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DCOLORIMETRY_SUPPORT -DJPEG_SUPPORT -DYCBCR_SUPPORT -DCMYK_SUPPORT -DHAVE_IEEEFP=1 -DUSE_VARARGS=0 -DUSE_PROTOTYPES=1 -DUSE_CONST=1 -I../include/TIFF -c TIFF/tif_dirwrite.c -fPIC -DPIC -o TIFF/.libs/tif_dirwrite.o
make[2]: Leaving directory '/builddir/build/BUILD/iv-74f120781bc2def0cc4d1f9f547c07037e8a7a74/src/lib'
TIFF/tif_dirwrite.c: In function 'TIFFWriteNormalTag':
TIFF/tif_dirwrite.c:442:24: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
442 | dir->tdir_offset = *(u_long *)&fv; /* XXX */
| ^~~~~~~~~~~~~
At top level:
TIFF/tif_dirwrite.c:5:13: warning: 'rcsid' defined but not used [-Wunused-variable]
--
make[2]: Leaving directory '/builddir/build/BUILD/iv-74f120781bc2def0cc4d1f9f547c07037e8a7a74/src/lib'
make[2]: Entering directory '/builddir/build/BUILD/iv-74f120781bc2def0cc4d1f9f547c07037e8a7a74/src/lib'
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I. -I../include -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c Unidraw/catcmds.cpp -fPIC -DPIC -o Unidraw/.libs/catcmds.o
Unidraw/catcmds.cpp: In member function 'virtual void ivViewCompCmd::Execute()':
Unidraw/catcmds.cpp:307:51: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
307 | if (catalog->Retrieve(name, (Component*&) comp)) {
| ^~~~
Unidraw/catcmds.cpp: In member function 'virtual void ivPrintCmd::Execute()':
Unidraw/catcmds.cpp:575:27: warning: 'tmpfilename' may be used uninitialized in this function [-Wmaybe-uninitialized]
--
Unidraw/import.cpp:220:10: warning: unused variable 'imported' [-Wunused-variable]
220 | bool imported = false;
| ^~~~~~~~
Unidraw/import.cpp: In static member function 'static ivGraphicComp* ivImportCmd::Import(const char*)':
Unidraw/import.cpp:260:52: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
260 | if (catalog->Valid(filename, (Component*&) comp)) {
| ^~~~
Unidraw/import.cpp:263:62: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
263 | } else if (catalog->Retrieve(filename, (Component*&) comp)) {
| ^~~~
Unidraw/import.cpp: In static member function 'static ivGraphicComp* ivImportCmd::PGM_Image(const char*)':
Unidraw/import.cpp:61:34: warning: value computed is not used [-Wunused-value]
--
make[3]: Leaving directory '/builddir/build/BUILD/iv-74f120781bc2def0cc4d1f9f547c07037e8a7a74/src/bin/idraw'
make[3]: Entering directory '/builddir/build/BUILD/iv-74f120781bc2def0cc4d1f9f547c07037e8a7a74/src/bin/idraw'
g++ -DHAVE_CONFIG_H -I. -I. -Div2_6_compatible -I../../include/IV-2_6 -I../../include -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c -o ided.o ided.cpp
ided.cpp: In constructor 'IdrawEditor::IdrawEditor(const char*)':
ided.cpp:160:44: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
160 | if (catalog->Retrieve(file, (Component*&) comp)) {
| ^~~~
make[3]: Leaving directory '/builddir/build/BUILD/iv-74f120781bc2def0cc4d1f9f547c07037e8a7a74/src/bin/idraw'
make[3]: Entering directory '/builddir/build/BUILD/iv-74f120781bc2def0cc4d1f9f547c07037e8a7a74/src/bin/idraw'
Since these may result in undefined behaviour, they are worth looking into? (I looked at this post to understand the warning better---it has some suggestions on how to handle such issues too).
The text was updated successfully, but these errors were encountered:
While building iv for NeuroFedora, we noticed a few
-Wstrict-aliasing
warnings (grepped from the build logs):Since these may result in undefined behaviour, they are worth looking into? (I looked at this post to understand the warning better---it has some suggestions on how to handle such issues too).
The text was updated successfully, but these errors were encountered: