spion / adbfs-rootless

Mount Android phones on Linux with adb. No root required.
Other
890 stars 73 forks source link

fix swapped memset args, add -Wall compiler flag #23

Closed quezak closed 5 years ago

quezak commented 6 years ago

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 :)