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 CMake #501

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

Some warnings building 4.5.0 with CMake #501

ArchangeGabriel opened this issue Oct 20, 2017 · 8 comments

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:

In file included from /build/netcdf/src/netcdf-c-4.5.0/libdap4/d4includes.h:44:0,
                 from /build/netcdf/src/netcdf-c-4.5.0/libdap4/d4meta.c:6:
/build/netcdf/src/netcdf-c-4.5.0/libdap4/d4meta.c: In function ‘buildCompound’:
/build/netcdf/src/netcdf-c-4.5.0/libdap4/d4meta.c:538:18: warning: passing argument 7 of ‘nc_insert_array_compound’ from incompatible pointer type [-Wincompatible-pointer-types]
            rank, dimsizes)));
                  ^
/build/netcdf/src/netcdf-c-4.5.0/libdap4/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 /build/netcdf/src/netcdf-c-4.5.0/libdap4/d4includes.h:33:0,
                 from /build/netcdf/src/netcdf-c-4.5.0/libdap4/d4meta.c:6:
/build/netcdf/src/netcdf-c-4.5.0/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,
 ^~~~~~~~~~~~~~~~~~~~~~~~
/build/netcdf/src/netcdf-c-4.5.0/nc_test/util.c: In function ‘inRange’:
/build/netcdf/src/netcdf-c-4.5.0/nc_test/util.c:24:12: warning: statement will never be executed [-Wswitch-unreachable]
     double min = 0.0;
            ^~~
@ArchangeGabriel ArchangeGabriel changed the title Some warnings building 4.5.0 Some warnings building 4.5.0 with CMake Oct 20, 2017
@WardF
Copy link
Member

WardF commented Oct 20, 2017

@DennisHeimbigner Since this is in dap4, any thoughts if this could be related to #500 as @ArchangeGabriel suggests?

@DennisHeimbigner
Copy link
Collaborator

I will have to check to see what is going on both here and for #500

@DennisHeimbigner
Copy link
Collaborator

The second of these (inRange) is a typo, but should otherwise be ok.
The first (d4meta.c) is a size/type mismatch between dap4 dimensions (size_t)
and netcdf dimensions. On 64bit machine, |size_t| != |int| so there will be a problem.

@DennisHeimbigner
Copy link
Collaborator

I cannot duplicate the nc_test fail, even on a 64bit machine.
Can you see if you can locate Testing/Temporary/LastTest.log
within the cmake build tree and post it.

DennisHeimbigner added a commit that referenced this issue Oct 21, 2017
The nc_test/util.c error is a typo. The libdap4/d4meta.c error only is shown
when using a 64 bit machine because then |size_t| == 64 bits
and |int| = 32bits.
@ArchangeGabriel
Copy link
Contributor Author

When I said related to #500, I was thinking the lastest warning in the test itself. ;)

@DennisHeimbigner I’ve posted the log in the #500.

@DennisHeimbigner
Copy link
Collaborator

Ok, we need to duplicate the error locally. Ward, have you been able to do that?

@WardF
Copy link
Member

WardF commented Oct 21, 2017

Not as of yet.

WardF added a commit that referenced this issue Oct 23, 2017
Fix dap4 related warnings in #501.
@WardF
Copy link
Member

WardF commented Oct 24, 2017

Fixed by pull request #503

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants