Ken Brown
2017-04-27 17:50:13 UTC
I'm getting the following compiler warnings on Cygwin with gcc-5.4.0:
system.c:122:30: warning: unused variable âauth_dataâ [-Wunused-variable]
const struct mu_auth_data *auth_data = key;
copyfile.c:166:16: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]
if (fchmod ((int) trans[0], mode))
^
copyfile.c:196:17: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]
if (fchown ((int) trans[0], uid, gid))
^
The attached patch silences the warnings. I'm not sure whether the
patch to copyfile.c is correct; it seems strange to be casting a pointer
to an integer which is then used as a file descriptor. But I admit that
I haven't studied the code.
Ken
system.c:122:30: warning: unused variable âauth_dataâ [-Wunused-variable]
const struct mu_auth_data *auth_data = key;
copyfile.c:166:16: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]
if (fchmod ((int) trans[0], mode))
^
copyfile.c:196:17: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]
if (fchown ((int) trans[0], uid, gid))
^
The attached patch silences the warnings. I'm not sure whether the
patch to copyfile.c is correct; it seems strange to be casting a pointer
to an integer which is then used as a file descriptor. But I admit that
I haven't studied the code.
Ken