aboutsummaryrefslogtreecommitdiff
path: root/src/tool_cb_see.c
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2018-07-09 18:43:55 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2018-08-21 18:53:45 +0200
commit60776a0515c2a8f572902ad5bcc9f63eeaeafa84 (patch)
tree79eb46200916b3c1c4df98fca8c2cb79d2c87acc /src/tool_cb_see.c
parentd5c0351055d5709da8f3e16c91348092fdb481aa (diff)
curl-compilers: enable -Wbad-function-cast on GCC
This warning used to be enabled only for clang as it's a bit stricter on GCC. Silence the remaining occurrences and enable it on GCC too. Closes https://github.com/curl/curl/pull/2747
Diffstat (limited to 'src/tool_cb_see.c')
-rw-r--r--src/tool_cb_see.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tool_cb_see.c b/src/tool_cb_see.c
index 621d440f4..061b2bb3d 100644
--- a/src/tool_cb_see.c
+++ b/src/tool_cb_see.c
@@ -118,10 +118,12 @@ int tool_seek_cb(void *userdata, curl_off_t offset, int whence)
int tool_ftruncate64(int fd, curl_off_t where)
{
+ intptr_t handle = _get_osfhandle(fd);
+
if(_lseeki64(fd, where, SEEK_SET) < 0)
return -1;
- if(!SetEndOfFile((HANDLE)_get_osfhandle(fd)))
+ if(!SetEndOfFile((HANDLE)handle))
return -1;
return 0;