]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Eliminate warnings, which are singed/unsigned mismatch, on Visual Studio.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Thu, 25 Feb 2010 09:47:21 +0000 (04:47 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Thu, 25 Feb 2010 09:47:21 +0000 (04:47 -0500)
SVN-Revision: 1979

libarchive/archive_write.c

index dd377e66d42a82452a4581b543d30c457299b1d6..bca4b7962fe03ae82f33b11f7d5e2bcea5abfdcb 100644 (file)
@@ -445,7 +445,7 @@ archive_write_client_write(struct archive_write_filter *f,
         if (state->avail < state->buffer_size) {
                 /* If buffer is not empty... */
                 /* ... copy data into buffer ... */
-                to_copy = (remaining > state->avail) ?
+                to_copy = ((size_t)remaining > state->avail) ?
                     state->avail : remaining;
                 memcpy(state->next, buff, to_copy);
                 state->next += to_copy;
@@ -464,7 +464,7 @@ archive_write_client_write(struct archive_write_filter *f,
                 }
         }
 
-        while (remaining > state->buffer_size) {
+        while ((size_t)remaining > state->buffer_size) {
                 /* Write out full blocks directly to client. */
                 bytes_written = (a->client_writer)(&a->archive,
                     a->client_data, buff, state->buffer_size);