diff --git a/dcapi/boinc/wu.C b/dcapi/boinc/wu.C index bf30203477..b6a44f5d18 100644 --- a/dcapi/boinc/wu.C +++ b/dcapi/boinc/wu.C @@ -726,7 +726,7 @@ int DC_addWUInput(DC_Workunit *wu, const char *logicalFileName, const char *URL, { va_start(ap, fileMode); char *md5 = va_arg(ap, char *); - int size = va_arg(ap, int); + size_t size = va_arg(ap, size_t); va_end(ap); rfile = _DC_createRemoteFile(logicalFileName, URL, md5, size); diff --git a/dcapi/common/util.c b/dcapi/common/util.c index 1a3f96c304..3b5d0c6bbf 100644 --- a/dcapi/common/util.c +++ b/dcapi/common/util.c @@ -167,7 +167,7 @@ DC_PhysicalFile *_DC_createPhysicalFile(const char *label, } DC_RemoteFile *_DC_createRemoteFile(const char *label, - const char *url, const char *md5, const int size) + const char *url, const char *md5, const size_t size) { DC_RemoteFile *file; diff --git a/dcapi/doc/tmpl/dc.sgml b/dcapi/doc/tmpl/dc.sgml index a953539abe..ba34189685 100644 --- a/dcapi/doc/tmpl/dc.sgml +++ b/dcapi/doc/tmpl/dc.sgml @@ -270,7 +270,7 @@ units in state %DC_WU_READY (i.e., before the work unit is submitted). %DC_FILE_VOLATILE allows DC-API to optimize the disk space requirements of the application. @Varargs: in case using %DC_FILE_REMOTE file mode, the MD5 hash string (char *) - and file size information (int) have to be passed. + and file size information (size_t) have to be passed. @Returns: 0 if successful or a #DC_ErrorCode. diff --git a/dcapi/include/dc_common.h b/dcapi/include/dc_common.h index 3cdaef51c3..4f18e50864 100644 --- a/dcapi/include/dc_common.h +++ b/dcapi/include/dc_common.h @@ -21,6 +21,7 @@ extern "C" { #include #endif +#include #include /******************************************************************** @@ -98,7 +99,7 @@ struct _DC_RemoteFile char *label; char *url; char *remotefilehash; - int remotefilesize; + size_t remotefilesize; }; diff --git a/dcapi/include/dc_internal.h b/dcapi/include/dc_internal.h index f9bbfb8d2b..6316ab30d7 100644 --- a/dcapi/include/dc_internal.h +++ b/dcapi/include/dc_internal.h @@ -60,7 +60,7 @@ DC_PhysicalFile *_DC_createPhysicalFile(const char *label, const char *path) __attribute__((visibility("hidden"))); /* Allocates a remote file descriptor */ -DC_RemoteFile *_DC_createRemoteFile(const char *label, const char *url, const char *md5, const int size) +DC_RemoteFile *_DC_createRemoteFile(const char *label, const char *url, const char *md5, const size_t size) __attribute__((visibility("hidden"))); /* De-allocates a physical file descriptor */