Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix infot.mod #1

Merged
merged 23 commits into from
May 27, 2022
Merged

Fix infot.mod #1

merged 23 commits into from
May 27, 2022

Conversation

iomaganaris
Copy link
Contributor

With the current version of infot.mod I get the following warning when compiling with NEURON 9.0.0:

 -> Compiling infot.cpp
infot.cpp: In function ‘double entropxfgxp(void*)’:
infot.cpp:1103:25: warning: argument 1 value ‘18446744072709551617’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
 1103 |   pXP = (double*) calloc(szp,sizeof(double));
      |                   ~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/cstdlib:75,
                 from /usr/include/c++/9/stdlib.h:36,
                 from infot.cpp:5:
/usr/include/stdlib.h:542:14: note: in a call to allocation function ‘void* calloc(size_t, size_t)’ declared here
  542 | extern void *calloc (size_t __nmemb, size_t __size)
      |              ^~~~~~

@ramcdougal
Copy link

Can you also add a brief note (1 line) to the readme indicating that the file has changed; see e.g. https://senselab.med.yale.edu/ModelDB/showmodel?model=2488&file=/cells/README.txt#tabs-2

@alexsavulescu
Copy link
Member

still WIP - do not merge

Copy link
Contributor Author

@iomaganaris iomaganaris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexsavulescu @kotsaloscv made some suggestions according to some changes I did in a similar file

Copy link

@pramodk pramodk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks ok to me but have left some questions / remarks for @iomaganaris

@@ -1099,6 +1106,7 @@ static double tetrospks2 (double* X1d,double* X2d,double* XO,int szX1,int szXO,i
cnt1/=sz; cnt2/=sz; // ignore if not enough of the windows are filled
if (cnt1<binmin) return -11.; else if (cnt2<binmin) return -12.;
if (binmax) if (cnt1>binmax) return -11.; else if (cnt2>binmax) return -12.;
/* this should perhaps be fabs */
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this (there's a C compiler warning) and was happy to leave it in, but I can remove it if you like.

@ramcdougal ramcdougal merged commit 7886f6a into ModelDBRepository:master May 27, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants