forked from neurolabusc/nii2mesh
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix issue 2 #1
Merged
Merged
Fix issue 2 #1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fangq
added a commit
that referenced
this pull request
Apr 19, 2022
thanks. I ran $ gcc -Wall --pedantic -O3 -DNII2MESH -DHAVE_ZLIB -DHAVE_JSON cJSON.c MarchingCubes.c nii2mesh.c isolevel.c meshify.c quadric.c base64.c bwlabel.c radixsort.c -o nii2mesh -lz -lm
nii2mesh.c: In function ‘main’:
nii2mesh.c:363:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
#pragma omp parallel private(partial_OK) shared(nOK)
nii2mesh.c:367:0: warning: ignoring #pragma omp for [-Wunknown-pragmas]
#pragma omp for
nii2mesh.c:392:0: warning: ignoring #pragma omp critical [-Wunknown-pragmas]
#pragma omp critical
meshify.c: In function ‘save_freesurfer’:
meshify.c:446:7: warning: the address of ‘littleEndianPlatform’ will always evaluate as ‘true’ [-Waddress]
if ( &littleEndianPlatform) {
^
meshify.c:455:6: warning: the address of ‘littleEndianPlatform’ will always evaluate as ‘true’ [-Waddress]
if (&littleEndianPlatform)
^
meshify.c:459:6: warning: the address of ‘littleEndianPlatform’ will always evaluate as ‘true’ [-Waddress]
if (&littleEndianPlatform) {
^
meshify.c: In function ‘load_jnii’:
meshify.c:717:37: warning: pointer targets in passing argument 2 of ‘jdata_decode’ differ in signedness [-Wpointer-sign]
if(jdata_decode((void **)&imgRaw, hdr->dim, hdr->dim+1, 3, &type, jniidata)!=0){
^~~
meshify.c:568:6: note: expected ‘short unsigned int *’ but argument is of type ‘short int *’
int jdata_decode(void **vol, unsigned short *ndim, unsigned short *dims, int maxdim, char **type, cJSON *obj){
^~~~~~~~~~~~
meshify.c:717:47: warning: pointer targets in passing argument 3 of ‘jdata_decode’ differ in signedness [-Wpointer-sign]
if(jdata_decode((void **)&imgRaw, hdr->dim, hdr->dim+1, 3, &type, jniidata)!=0){
^~~
meshify.c:568:6: note: expected ‘short unsigned int *’ but argument is of type ‘short int *’
int jdata_decode(void **vol, unsigned short *ndim, unsigned short *dims, int maxdim, char **type, cJSON *obj){
^~~~~~~~~~~~
meshify.c:763:28: warning: pointer targets in passing argument 2 of ‘array3d_row2col’ differ in signedness [-Wpointer-sign]
array3d_row2col(&img32, hdr->dim+1);
^~~
meshify.c:621:6: note: expected ‘short unsigned int *’ but argument is of type ‘short int *’
void array3d_row2col(float **vol, unsigned short *dim){
^~~~~~~~~~~~~~~
meshify.c: In function ‘write_ubjsonint’:
meshify.c:861:6: warning: the address of ‘littleEndianPlatform’ will always evaluate as ‘true’ [-Waddress]
if (!&littleEndianPlatform)
^
meshify.c: In function ‘write_ubjsonfloat’:
meshify.c:867:6: warning: the address of ‘littleEndianPlatform’ will always evaluate as ‘true’ [-Waddress]
if (!&littleEndianPlatform)
^
meshify.c: In function ‘write_ubjsondouble’:
meshify.c:873:6: warning: the address of ‘littleEndianPlatform’ will always evaluate as ‘true’ [-Waddress]
if (!&littleEndianPlatform)
^
meshify.c: In function ‘save_bmsh’:
meshify.c:954:24: warning: pointer targets in passing argument 2 of ‘write_ubjsonint’ differ in signedness [-Wpointer-sign]
write_ubjsonint(1,&keylen,fp);
^
meshify.c:860:6: note: expected ‘int *’ but argument is of type ‘unsigned int *’
void write_ubjsonint(int len, int *dat, FILE *fp){
^~~~~~~~~~~~~~~
meshify.c:986:33: warning: pointer targets in passing argument 2 of ‘write_ubjsonint’ differ in signedness [-Wpointer-sign]
write_ubjsonint(ntri*3, newtris, fp);
^~~~~~~
meshify.c:860:6: note: expected ‘int *’ but argument is of type ‘unsigned int *’
void write_ubjsonint(int len, int *dat, FILE *fp){
^~~~~~~~~~~~~~~
meshify.c:963:24: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]
int dim[2]={0,3}, len[2]={1,0};
^~~
meshify.c: In function ‘save_mz3’:
meshify.c:1084:6: warning: the address of ‘littleEndianPlatform’ will always evaluate as ‘true’ [-Waddress]
if (! &littleEndianPlatform)
^
meshify.c:1102:6: warning: the address of ‘littleEndianPlatform’ will always evaluate as ‘true’ [-Waddress]
if (! &littleEndianPlatform) {
^
meshify.c:1126:6: warning: the address of ‘littleEndianPlatform’ will always evaluate as ‘true’ [-Waddress]
if (! &littleEndianPlatform)
^
meshify.c: In function ‘save_ply’:
meshify.c:1224:6: warning: the address of ‘littleEndianPlatform’ will always evaluate as ‘true’ [-Waddress]
if (&littleEndianPlatform)
^
meshify.c: In function ‘save_gii’:
meshify.c:1290:6: warning: the address of ‘littleEndianPlatform’ will always evaluate as ‘true’ [-Waddress]
if (&littleEndianPlatform)
^
meshify.c:1332:6: warning: the address of ‘littleEndianPlatform’ will always evaluate as ‘true’ [-Waddress]
if (&littleEndianPlatform)
^
meshify.c: In function ‘save_vtk’:
meshify.c:1391:6: warning: the address of ‘littleEndianPlatform’ will always evaluate as ‘true’ [-Waddress]
if (&littleEndianPlatform)
^
meshify.c:1405:6: warning: the address of ‘littleEndianPlatform’ will always evaluate as ‘true’ [-Waddress]
if (&littleEndianPlatform)
^
meshify.c: In function ‘save_mz3’:
meshify.c:1131:3: warning: ‘fgz’ may be used uninitialized in this function [-Wmaybe-uninitialized]
gzclose(fgz);
^~~~~~~~~~~~
meshify.c:1136:3: warning: ‘fp’ may be used uninitialized in this function [-Wmaybe-uninitialized]
fclose(fp);
^~~~~~~~~~
quadric.c: In function ‘quadric_simplify_mesh’:
quadric.c:452:7: warning: ‘iterationStartCount’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (iterationStartCount == (triangle_count-deleted_triangles)) break;
^ |
These all look fine. The compiler is right,
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Clang
gcc