summaryrefslogtreecommitdiffstats
path: root/format/format.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-03-12 16:27:10 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-03-13 09:33:18 +0000
commit0acbcde6c8a2ca0539c7cd18698a797a23b75beb (patch)
tree6841c9e34e705a1cd98cee77e8d92f5939b214c8 /format/format.c
parent5394fab35408818bd71cf86df1f2353f1e193ff4 (diff)
downloadlibguestfs-0acbcde6c8a2ca0539c7cd18698a797a23b75beb.tar.gz
libguestfs-0acbcde6c8a2ca0539c7cd18698a797a23b75beb.tar.xz
libguestfs-0acbcde6c8a2ca0539c7cd18698a797a23b75beb.zip
Fix strict-overflow bugs and reenable this warning.
In two places, we were counting things in an array using an 'int'. In theory, the int could overflow, so gcc determines this to be undefined behaviour. The fix is to use size_t or ssize_t instead. (cherry picked from commit d66dd2260c724bdfe57a8595aac37c8e9173cee5)
Diffstat (limited to 'format/format.c')
-rw-r--r--format/format.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/format/format.c b/format/format.c
index 13fe0ca8..06428e88 100644
--- a/format/format.c
+++ b/format/format.c
@@ -435,7 +435,7 @@ static int
do_rescan (char **devices)
{
size_t i;
- int errors = 0;
+ size_t errors = 0;
guestfs_error_handler_cb old_error_cb;
void *old_error_data;