Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build warnings #137

Open
Tux opened this issue Dec 29, 2021 · 5 comments
Open

Build warnings #137

Tux opened this issue Dec 29, 2021 · 5 comments

Comments

@Tux
Copy link
Member

Tux commented Dec 29, 2021

cc -c  -I/usr/include/oracle/19.13/client64 -I/pro/lib/perl5/site_perl/5.28.0/x86_64-linux-thread-multi-ld/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fPIC -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2   -DVERSION=\"1.00\" -DXS_VERSION=\"1.00\" -fPIC "-I/pro/lib/perl5/5.28.0/x86_64-linux-thread-multi-ld/CORE"  -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"19.13.0.0\" -DORA_OCI_102 -DORA_OCI_112 dbdimp.c
dbdimp.c: In function ‘ora_bind_ph’:
dbdimp.c:3401:4: warning: increment of a boolean expression [-Wbool-operation]
    ++imp_sth->has_inout_params;
    ^~
dbdimp.c: In function ‘dump_env_to_trace’:
dbdimp.c:4764:29: warning: comparison between pointer and zero character constant [-Wpointer-compare]
  } while ((char*)environ[i] != '\0');
                             ^~
dbdimp.c:4764:11: note: did you mean to dereference the pointer?
  } while ((char*)environ[i] != '\0');
           ^
cc -c  -I/usr/include/oracle/19.13/client64 -I/pro/lib/perl5/site_perl/5.28.0/x86_64-linux-thread-multi-ld/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fPIC -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2   -DVERSION=\"1.00\" -DXS_VERSION=\"1.00\" -fPIC "-I/pro/lib/perl5/5.28.0/x86_64-linux-thread-multi-ld/CORE"  -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"19.13.0.0\" -DORA_OCI_102 -DORA_OCI_112 oci8.c
oci8.c:18:0: warning: "sv_set_undef" redefined
 #define sv_set_undef(sv) if (SvROK(sv)) sv_unref(sv); else SvOK_off(sv)

In file included from /pro/lib/perl5/5.28.0/x86_64-linux-thread-multi-ld/CORE/perl.h:5310:0,
                 from /pro/lib/perl5/site_perl/5.28.0/x86_64-linux-thread-multi-ld/auto/DBI/DBIXS.h:23,
                 from Oracle.h:50,
                 from oci8.c:12:
/pro/lib/perl5/5.28.0/x86_64-linux-thread-multi-ld/CORE/embed.h:809:0: note: this is the location of the previous definition
 #define sv_set_undef(a)  Perl_sv_set_undef(aTHX_ a)

oci8.c: In function ‘get_attr_val’:
oci8.c:2335:23: warning: ‘%03d’ directive writing between 3 and 4 bytes into a region of size 2 [-Wformat-overflow=]
     sprintf(s_tz_hour," %03d",tz_hour);
                       ^~~~~~~
oci8.c:2335:23: note: directive argument in the range [-128, 127]
In file included from /usr/include/stdio.h:862:0,
                 from /pro/lib/perl5/5.28.0/x86_64-linux-thread-multi-ld/CORE/perlio.h:41,
                 from /pro/lib/perl5/5.28.0/x86_64-linux-thread-multi-ld/CORE/iperlsys.h:51,
                 from /pro/lib/perl5/5.28.0/x86_64-linux-thread-multi-ld/CORE/perl.h:3603,
                 from /pro/lib/perl5/site_perl/5.28.0/x86_64-linux-thread-multi-ld/auto/DBI/DBIXS.h:23,
                 from Oracle.h:50,
                 from oci8.c:12:
/usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 5 and 6 bytes into a destination of size 3
   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       __bos (__s), __fmt, __va_arg_pack ());
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
oci8.c:2337:23: warning: ‘%02d’ directive writing between 2 and 4 bytes into a region of size 2 [-Wformat-overflow=]
     sprintf(s_tz_hour," %02d",tz_hour);
                       ^~~~~~~
oci8.c:2337:23: note: directive argument in the range [-128, 127]
In file included from /usr/include/stdio.h:862:0,
                 from /pro/lib/perl5/5.28.0/x86_64-linux-thread-multi-ld/CORE/perlio.h:41,
                 from /pro/lib/perl5/5.28.0/x86_64-linux-thread-multi-ld/CORE/iperlsys.h:51,
                 from /pro/lib/perl5/5.28.0/x86_64-linux-thread-multi-ld/CORE/perl.h:3603,
                 from /pro/lib/perl5/site_perl/5.28.0/x86_64-linux-thread-multi-ld/auto/DBI/DBIXS.h:23,
                 from Oracle.h:50,
                 from oci8.c:12:
/usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 4 and 6 bytes into a destination of size 3
   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       __bos (__s), __fmt, __va_arg_pack ());
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
oci8.c:2340:21: warning: ‘%02d’ directive writing between 2 and 4 bytes into a region of size 2 [-Wformat-overflow=]
    sprintf(s_tz_min,":%02d", tz_minute);
                     ^~~~~~~
oci8.c:2340:21: note: directive argument in the range [-128, 127]
In file included from /usr/include/stdio.h:862:0,
                 from /pro/lib/perl5/5.28.0/x86_64-linux-thread-multi-ld/CORE/perlio.h:41,
                 from /pro/lib/perl5/5.28.0/x86_64-linux-thread-multi-ld/CORE/iperlsys.h:51,
                 from /pro/lib/perl5/5.28.0/x86_64-linux-thread-multi-ld/CORE/perl.h:3603,
                 from /pro/lib/perl5/site_perl/5.28.0/x86_64-linux-thread-multi-ld/auto/DBI/DBIXS.h:23,
                 from Oracle.h:50,
                 from oci8.c:12:
/usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 4 and 6 bytes into a destination of size 3
   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       __bos (__s), __fmt, __va_arg_pack ());
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rm -f blib/arch/auto/DBD/Oracle/Oracle.so
LD_RUN_PATH="/usr/lib/oracle/19.13/client64/lib" ccache cc  -shared -O2 -L/pro/local/lib -fstack-protector-strong  Oracle.o dbdimp.o oci8.o  -o blib/arch/auto/DBD/Oracle/Oracle.so  \
   -L/usr/lib/oracle/19.13/client64/lib -lclntsh   \

chmod 755 blib/arch/auto/DBD/Oracle/Oracle.so
Manifying 11 pod documents
@Tux
Copy link
Member Author

Tux commented Dec 29, 2021

FWIW this is git checkout bec4df4 on OIC 19.13 to a 19.3 database

Linux 5.3.18-lp152.106-preempt [openSUSE Leap 15.2] x86_64
gcc (SUSE Linux) 7.5.0

@djzort
Copy link
Collaborator

djzort commented Dec 29, 2021

could be related to #76

@whindsx
Copy link

whindsx commented Dec 30, 2021

gcc (SUSE Linux) 7.5.0

It's your gcc version. Version 7+ enables a lot more (C++) warnings when -Wall is passed, see: -Wbool-operation

I compiled bec4df4 with gcc 4.8.5 and saw just the usual warnings.

@djzort
Copy link
Collaborator

djzort commented Jan 19, 2022

Pull requests gladly accepted. Even just bitsy ones to chip away at the warnings.

@djzort
Copy link
Collaborator

djzort commented Apr 21, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants