diff --git a/src/libgourou.cpp b/src/libgourou.cpp index cdf3848..9210460 100644 --- a/src/libgourou.cpp +++ b/src/libgourou.cpp @@ -940,7 +940,7 @@ namespace gourou /* In adobekey.py, we get base64 decoded data [26:] */ ret = write(fd, privateLicenseKey.data()+26, privateLicenseKey.length()-26); close(fd); - if (ret != privateLicenseKey.length()-26) + if (ret != (int)(privateLicenseKey.length()-26)) { EXCEPTION(gourou::GOUROU_FILE_ERROR, "Error writing " << path); } diff --git a/utils/utils_common.cpp b/utils/utils_common.cpp index 41c0ac7..08ca3a2 100644 --- a/utils/utils_common.cpp +++ b/utils/utils_common.cpp @@ -98,7 +98,7 @@ void mkpath(const char *dir) void fileCopy(const char* in, const char* out) { - char buffer[4096]; + char buffer[4096], *_buffer; int ret, ret2, fdIn, fdOut; fdIn = open(in, O_RDONLY); @@ -121,11 +121,12 @@ void fileCopy(const char* in, const char* out) break; do { - ret2 = ::write(fdOut, buffer, ret); + _buffer = buffer; + ret2 = ::write(fdOut, _buffer, ret); if (ret2 >= 0) { ret -= ret2; - buffer += ret2; + _buffer += ret2; } else {