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

Some warnings building 4.5.0 with autotools #502

Closed
3 of 5 tasks
ArchangeGabriel opened this issue Oct 20, 2017 · 4 comments
Closed
3 of 5 tasks

Some warnings building 4.5.0 with autotools #502

ArchangeGabriel opened this issue Oct 20, 2017 · 4 comments
Assignees
Milestone

Comments

@ArchangeGabriel
Copy link
Contributor

Environment Information

  • What platform are you using? (please provide specific distribution/version in summary)
    • Linux
  • 32 and/or 64 bit?
    • 32-bit
    • 64-bit
  • What build system are you using?
    • autotools (configure)
    • cmake

Warnings in build log:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -MT libdispatch_la-drc.lo -MD -MP -MF .deps/libdispatch_la-drc.Tpo -c drc.c  -fPIC -DPIC -o .libs/libdispatch_la-drc.o
In file included from /usr/include/string.h:494:0,
                 from drc.c:15:
In function ‘memcpy’,
    inlined from ‘rc_compile’ at drc.c:295:3,
    inlined from ‘ncrc_load’ at drc.c:93:8:
/usr/include/bits/string_fortified.h:34:10: warning: ‘__builtin_memcpy’: specified size 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -I../libsrc4 -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -MT libdap4_la-d4meta.lo -MD -MP -MF .deps/libdap4_la-d4meta.Tpo -c d4meta.c  -fPIC -DPIC -o .libs/libdap4_la-d4meta.o
In file included from d4includes.h:44:0,
                 from d4meta.c:6:
d4meta.c: In function ‘buildCompound’:
d4meta.c:538:18: warning: passing argument 7 of ‘nc_insert_array_compound’ from incompatible pointer type [-Wincompatible-pointer-types]
            rank, dimsizes)));
                  ^
ncd4.h:175:32: note: in definition of macro ‘NCCHECK’
 #define NCCHECK(expr) if((ret=(expr))) {ret = NCD4_errorNC(ret,__LINE__,__FILE__); goto done;}else{}
                                ^~~~
In file included from d4includes.h:33:0,
                 from d4meta.c:6:
../include/netcdf.h:593:1: note: expected ‘const int *’ but argument is of type ‘size_t * {aka long unsigned int *}’
 nc_insert_array_compound(int ncid, nc_type xtype, const char *name,
 ^~~~~~~~~~~~~~~~~~~~~~~~
gcc -DHAVE_CONFIG_H -I. -I..  -I../include -I../oc2  -D_FORTIFY_SOURCE=2  -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -MT main.o -MD -MP -MF $depbase.Tpo -c -o main.o main.c &&\
mv -f $depbase.Tpo $depbase.Po
main.c: In function ‘main’:
main.c:477:10: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
          (void)fread(bom,1,1,fp);
          ^~~~~~~~~~~~~~~~~~~~~~~
tst_h_dimscales.c: In function ‘main’:
tst_h_dimscales.c:382:34: warning: passing argument 2 of ‘H5Gget_num_objs’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]
       if (H5Gget_num_objs(grpid, &num_obj) < 0) ERR;
                                  ^
In file included from /usr/include/hdf5.h:29:0,
                 from tst_h_dimscales.c:12:
/usr/include/H5Gpublic.h:165:15: note: expected ‘hsize_t * {aka long long unsigned int *}’ but argument is of type ‘volatile hsize_t * {aka volatile long long unsigned int *}’
 H5_DLL herr_t H5Gget_num_objs(hid_t loc_id, hsize_t *num_objs);
               ^~~~~~~~~~~~~~~

I’m wondering if the last one could be linked with #244.

@ArchangeGabriel ArchangeGabriel changed the title Some warning building 4.5.0 with autotools Some warnings building 4.5.0 with autotools Oct 20, 2017
@WardF
Copy link
Member

WardF commented Oct 20, 2017

Interesting. I'll take a look at that. Good catch.

@WardF WardF added this to the 4.5.1 milestone Oct 20, 2017
@WardF WardF self-assigned this Oct 20, 2017
@WardF
Copy link
Member

WardF commented Oct 20, 2017

So correcting this warning doesn't appear to have an impact on the failure we are observing. What version gcc are you working with?

@ArchangeGabriel
Copy link
Contributor Author

7.2.0

@WardF
Copy link
Member

WardF commented Oct 24, 2017

Thanks. It looks like we got #244 fixed via a pull request, yesterday; I'll take a look at the other warnings that persist once we've cleared the backlog of pull requests.

@WardF WardF closed this as completed Oct 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants