Adding -Wall compilation flag revealed a simple mistake, the arguments for a memset were swapped:
adbfs.cpp: In function ‘int main(int, char**)’:
adbfs.cpp:960:46: warning: ‘memset’ used with constant zero length parameter; this could be due to transposed parameters [-Wmemset-transposed-args]
memset(&adbfs_oper, sizeof(adbfs_oper), 0);
^
While this should not cause problems (the struct is static, so it's 0 anyway), it still should be corrected :)
Adding
-Wall
compilation flag revealed a simple mistake, the arguments for amemset
were swapped:While this should not cause problems (the struct is static, so it's 0 anyway), it still should be corrected :)