Can somebody assist with testing these fixes please?
I'm locked away in conference for the next few days but would like to
see these resolved despite that.
Attached is an experimental fix for snmplib. If it works without
breaking anything the other warnings involving C++/C crossover may be
fixed in the same way.
Those where there is actually no crossover can be fixed far better by
just dropping the SQUIDCEXTERN down to extern.
> "../../src/snmp_core.cc", line 120: Warning (Anachronism), wbadasg: Assigning void(*)(int,char*) to extern "C" void(*)(int,char*).
This is the one hopefully fixed by the patch attached.
> "../../src/snmp_core.cc", line 146: Warning (Anachronism), badargtype2w: Formal argument parsefunction of type variable_list*(*)(variable_list*,long*) in call to snmpAddNodeStr(const char*, int, variable_list*(*)(variable_list*,long*), unsigned*(*)(unsigned*,long*,_mib_tree_entry*,variable_list*(*)(variable_list*,long*)*)) is being passed extern "C" variable_list*(*)(variable_list*,long*).
.. blah, blah...
> "../../src/snmp_core.cc", line 293: Warning (Anachronism), badargtype2w: Formal argument parsefunction of type variable_list*(*)(variable_list*,long*) in call to snmpAddNodeStr(const char*, int, variable_list*(*)(variable_list*,long*), unsigned*(*)(unsigned*,long*,_mib_tree_entry*,variable_list*(*)(variable_list*,long*)*)) is being passed extern "C" variable_list*(*)(variable_list*,long*).
> "../../src/snmp_core.cc", line 294: Warning (Anachronism), badargtype2w: Formal argument parsefunction of type variable_list*(*)(variable_list*,long*) in call to snmpAddNodeStr(const char*, int, variable_list*(*)(variable_list*,long*), unsigned*(*)(unsigned*,long*,_mib_tree_entry*,variable_list*(*)(variable_list*,long*)*)) is being passed extern "C" variable_list*(*)(variable_list*,long*).
> "../../src/snmp_core.cc", line 295: Warning (Anachronism), badargtype2w: Formal argument parsefunction of type variable_list*(*)(variable_list*,long*) in call to snmpAddNodeStr(const char*, int, variable_list*(*)(variable_list*,long*), unsigned*(*)(unsigned*,long*,_mib_tree_entry*,variable_list*(*)(variable_list*,long*)*)) is being passed extern "C" variable_list*(*)(variable_list*,long*).
> "../../src/snmp_core.cc", line 296: Warning (Anachronism), badargtype2w: Formal argument parsefunction of type variable_list*(*)(variable_list*,long*) in call to snmpAddNodeStr(const char*, int, variable_list*(*)(variable_list*,long*), unsigned*(*)(unsigned*,long*,_mib_tree_entry*,variable_list*(*)(variable_list*,long*)*)) is being passed extern "C" variable_list*(*)(variable_list*,long*).
> 95 Warning(s) detected.
These identical problem with different functions I think will work
without SQUIDCEXTERN in their protos.h definition. I have not checked
all but a lot are defined and used only in .cc files.
Others I have not had time to investigate yet...
> "../../src/main.cc", line 971: Warning (Anachronism), badargtype2w:
Formal argument 2 of type void(*)(int) in call to squid_signal(int,
void(*)(int), int) is being passed extern "C" void(*)(int).
> "../../src/main.cc", line 1321: Warning (Anachronism), wbadasg:
Assigning extern "C" void(*)(const char*) to void(*)(const char*).
> "../../src/main.cc", line 1741: Warning (Anachronism), badargtype2w:
Formal argument 2 of type void(*)(int) in call to squid_signal(int,
void(*)(int), int) is being passed extern "C" void(*)(int).
> "../../src/main.cc", line 1796: Warning (Anachronism), badargtype2w:
Formal argument 2 of type void(*)(int) in call to squid_signal(int,
void(*)(int), int) is being passed extern "C" void(*)(int).
> 4 Warning(s) detected.
> "../../src/Packer.cc", line 120: Warning (Anachronism), wbadinit:
Using extern "C" void(*)(StoreEntry*,const char*,void*) to initialize
void(*const)(StoreEntry*,const char*,void*).
> 1 Warning(s) detected.
Thanks.
Amos
-- Please be using Current Stable Squid 2.7.STABLE9 or 3.1.9 Beta testers wanted for 3.2.0.3
This archive was generated by hypermail 2.2.0 : Tue Nov 30 2010 - 12:00:05 MST