buzsakilab / buzcode

Code for internal lab sharing - polishing has started but is by no means complete
http://www.buzsakilab.com/
GNU General Public License v3.0
119 stars 127 forks source link

Fixed memcpy declaration #420

Open RJain12 opened 11 months ago

RJain12 commented 11 months ago

When I tried to run the CCG script, I got this error:

/Users/rishabjain/Desktop/Research/PETH neuron
test/human-layers/ExternalPackages/dev/analysis/monosynapticPairs/CCGHeart.c:195:3: error: call to
undeclared library function 'memcpy' with type 'void *(void *, const void *, unsigned long)'; ISO C99
and later do not support implicit function declarations [-Wimplicit-function-declaration]
                memcpy(mxGetPr(plhs[1]), (void *)Pairs, PairCnt*sizeof(unsigned int));
                ^
/Users/rishabjain/Desktop/Research/PETH neuron
test/human-layers/ExternalPackages/dev/analysis/monosynapticPairs/CCGHeart.c:195:3: note: include the
header <string.h> or explicitly provide a declaration for 'memcpy'

The error message is indicating that the function memcpy is being used without a proper declaration.

I simply added

#include <string.h>

To this C engine file.

brendonw1 commented 11 months ago

Thank you very much!

Brendon Watson, MD-PhD Assistant Professor in Psychiatry, Bioinformatics and Biomedical Engineering

Biomedical Sciences Research Building, Room 5059 University of Michigan 109 Zina Pitcher Place Ann Arbor, MI 48109-5720 Lab Website: http://watsonneurolab.org Clinical phone: 734-764-0231

On Thu, Jul 27, 2023 at 2:03 PM Rishab Jain @.***> wrote:

When I tried to run the CCG script, I got this error:

/Users/rishabjain/Desktop/Research/PETH neuron test/human-layers/ExternalPackages/dev/analysis/monosynapticPairs/CCGHeart.c:195:3: error: call to undeclared library function 'memcpy' with type 'void (void , const void , unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] memcpy(mxGetPr(plhs[1]), (void )Pairs, PairCnt*sizeof(unsigned int)); ^ /Users/rishabjain/Desktop/Research/PETH neuron test/human-layers/ExternalPackages/dev/analysis/monosynapticPairs/CCGHeart.c:195:3: note: include the header or explicitly provide a declaration for 'memcpy'

The error message is indicating that the function memcpy is being used without a proper declaration.

I simply added

include

To this C engine file.

You can view, comment on, or merge this pull request online at:

https://github.com/buzsakilab/buzcode/pull/420 Commit Summary

File Changes

(1 file https://github.com/buzsakilab/buzcode/pull/420/files)

Patch Links:

— Reply to this email directly, view it on GitHub https://github.com/buzsakilab/buzcode/pull/420, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA26WTP7V3DHZIXYOVTNO3TXSKUL5ANCNFSM6AAAAAA22OCWG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>