Description of problem: Build against net-snmp-devel terminates with "invalid lvalue in assignment" Version-Release number of selected component (if applicable): net-snmp-5.4.1-4.fc8 How reproducible: Always Steps to Reproduce: 1. wget http://bjohnson.fedorapeople.org/ntop-3.3-3.fc8.src.rpm 2. koji build --scratch dist-f8-updates-candidate ntop-3.3-3.fc8.src.rpm 3. Actual results: http://koji.fedoraproject.org/koji/taskinfo?taskID=247309 http://koji.fedoraproject.org/koji/getfile?taskID=247321&name=build.log Expected results: clean build Additional info: This is a regression from F7.
The memory deallocation in ntop collides with the one in net-snmp and new gcc. After all macros are expanded I get in containers.h:440: if (((void *)0) != x->container_name) do { if (x->container_name) { { void *__t = ((void *)x->container_name); ntop_safefree((void**)&(__t), "/usr/include/net-snmp/library/container.h", 440); (void *)x->container_name = __t; }; x->container_name=((void *)0); } } while(0); I do not see anything wrong at the first sight, I'll try to investigate it. The code is perfectly compilable with gcc in Fedora 7.
The line "(void *)x->container_name = __t;" is syntactically wrong, cast (void*) does not result in l-value, see ISO C, section 6.5.4, You redefine free() and you assume that the value passed there is l-value, but net-snmp passes r-value -> compilation error. Your free() should accept r-value instead, as usual function call.
Thanks for your very timely response. I'll try to get that fixed.