diff options
| author | Martin Pitt <martin.pitt@ubuntu.com> | 2010-10-21 09:35:29 +0200 |
|---|---|---|
| committer | Martin Pitt <martin.pitt@ubuntu.com> | 2010-10-21 09:35:29 +0200 |
| commit | dd48c454f14b6063f8584631f04bf4528969a82b (patch) | |
| tree | ad35fd686e3620b2e102717513d714fc1daf8c28 | |
| parent | 5d07c97811138fa1542dd09f3178dad812b81a23 (diff) | |
Fix uninitialized variable in part-id
With gcc 4.5:
part-id.c: In function ‘main’:
part-id.c:186:9: error: ‘partition_number’ may be used uninitialized in this function
This only affected the error path, where we would return an arbitrary value in
get_part_table_device_file()'s out_partition_number (but return a failure
result). No big deal, but let's initialize it for quiescing gcc.
| -rw-r--r-- | src/probers/part-id.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/probers/part-id.c b/src/probers/part-id.c index 25d91f9..658e7d9 100644 --- a/src/probers/part-id.c +++ b/src/probers/part-id.c @@ -190,6 +190,7 @@ get_part_table_device_file (struct udev_device *given_device, devpath = NULL; offset = 0; + partition_number = 0; ret = NULL; partition_table_syspath = NULL; alignment_offset = 0; |
