diff options
author | Chih-Hung Hsieh <chh@google.com> | 2022-12-08 19:58:25 -0800 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2022-12-08 20:18:26 -0800 |
commit | ca09cd5b5b6f5339da563860cb1fa0b4dfa41201 (patch) | |
tree | 0e776b7d19d51807efe2821b59a94a0c335ffb89 /ext4_utils | |
parent | 0edf39a952cbe2364ce022d4e95af77d6b5de423 (diff) | |
download | extras-ca09cd5b5b6f5339da563860cb1fa0b4dfa41201.tar.gz |
Fix sizeof warnings on calloc
Although sizeof(char*) and sizeof(struct ext4_super_block*)
should have the same value; use the correct type to suppress
the warning.
Bug: 261919363
Test: make tidy-system-extras_subset
Change-Id: Ib6e17a3ef5010aa01d7fdb4f8e804f4714574edd
Diffstat (limited to 'ext4_utils')
-rw-r--r-- | ext4_utils/ext4_utils.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext4_utils/ext4_utils.cpp b/ext4_utils/ext4_utils.cpp index 632d8292..5fce61bc 100644 --- a/ext4_utils/ext4_utils.cpp +++ b/ext4_utils/ext4_utils.cpp @@ -144,7 +144,8 @@ void ext4_create_fs_aux_info() { aux_info.sb = aux_info.sb_block; /* Alloc an array to hold the pointers to the backup superblocks */ - aux_info.backup_sb = (struct ext4_super_block**)calloc(aux_info.groups, sizeof(char*)); + aux_info.backup_sb = + (struct ext4_super_block**)calloc(aux_info.groups, sizeof(struct ext4_super_block*)); if (!aux_info.sb) critical_error_errno("calloc"); |