diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-03-12 16:27:10 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-03-12 16:27:10 +0000 |
commit | d66dd2260c724bdfe57a8595aac37c8e9173cee5 (patch) | |
tree | ba15c128b3acede41361125aaa0c569bbbc870d3 /format | |
parent | 17182af3a6de8e3e94e0a914416c54f09bb74007 (diff) | |
download | libguestfs-d66dd2260c724bdfe57a8595aac37c8e9173cee5.tar.gz libguestfs-d66dd2260c724bdfe57a8595aac37c8e9173cee5.tar.xz libguestfs-d66dd2260c724bdfe57a8595aac37c8e9173cee5.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.
Diffstat (limited to 'format')
-rw-r--r-- | format/format.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/format/format.c b/format/format.c index 0cf010ab..40e53c52 100644 --- a/format/format.c +++ b/format/format.c @@ -424,7 +424,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; |