In file included from smartcard/scard/scard_wrap.c:2991:0:
smartcard/scard/scard_wrap.c: In function ‘_wrap_SCardGetAttrib’:
smartcard/scard/memlog.h:50:26: warning: attempt to free a non-heap object ‘temp3’ [-Wfree-nonheap-object]
#define mem_Free free
^
smartcard/scard/scard_wrap.c:4025:9: note: in expansion of macro ‘mem_Free’
mem_Free( arg3 );
^
I also get these warnings:
This code is generated by SWIG http://www.swig.org/. So I can do much.
It looks like false positives from the C compiler. The memory is allocated in another function and that confuses the C compiler.
I trust SWIG to do the right thing:
I don't know how to fix these warnings. Maybe you should report the problem to SWIG?
yes, I agree, this is false positive, I reviewed the code.
I did not know this is generated code.