Hello Gisle,
Thanks for your email.
On 4 Mar 2023, at 10:44, Gisle Vanem gvanem@online.no wrote:
Hello list.
Compiling with 'clang-cl' on Windows-10, I saw this important warning: network.c(796,10): warning: variable 'counter' set but not used [-Wunused-but-set-variable] size_t* counter = (size_t*)data; ^
So shouldn't the function be:
static int __loc_network_tree_count(struct loc_network* network, void* data) { size_t* counter = (size_t*)data;
// Increase the counter for each network (*counter)++; return 0;
Yes, you are incorrect. I am incrementing the pointer when I wanted to increment the value. Probably this is an artefact from rewriting the code a few times.
But indeed this has not been a problem since the function is not being called at all in the code, and it is not being exported.
So assuming that it is not very useful, I will drop loc_network_tree_count_networks and the callback function.
Thank you for helping to improve libloc. How does it run on Windows?
Best, -Michael
}
But I fail to see this ret-val is used for anything.
BTW, disasm now is correct: inc qword ptr [rdx] xor eax,eax ret
-- --gv