]> granicus.if.org Git - curl/commitdiff
examples/sftpuploadresume: typecast fseek argument to long
authorDaniel Stenberg <daniel@haxx.se>
Tue, 24 Apr 2018 12:11:53 +0000 (14:11 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 24 Apr 2018 12:11:53 +0000 (14:11 +0200)
/docs/examples/sftpuploadresume.c:102:12: warning: conversion to 'long
int' from 'curl_off_t {aka long long int}' may alter its value

docs/examples/sftpuploadresume.c

index 3fcab71fb354a3d9b3f5ae313406ecb1cf79b384..6e60c1e57b46c26ddb2f0f0979915e413b1b630c 100644 (file)
@@ -99,7 +99,7 @@ static int sftpResumeUpload(CURL *curlhandle, const char *remotepath,
 #ifdef _WIN32
   _fseeki64(f, remoteFileSizeByte, SEEK_SET);
 #else
-  fseek(f, remoteFileSizeByte, SEEK_SET);
+  fseek(f, (long)remoteFileSizeByte, SEEK_SET);
 #endif
   curl_easy_setopt(curlhandle, CURLOPT_APPEND, 1L);
   result = curl_easy_perform(curlhandle);