block: partitions: only define function mac_fix_string for CONFIG_PPC_PMAC
Subsystems (2)
PATCH 1/1 block: partitions: only define function mac_fix_string for CONFIG_PPC_PMAC
The helper function mac_fix_string is only required with CONFIG_PPC_PMAC, add #if CONFIG_PPC_PMAC and #endif around the function.
Cleans up clang scan build warning:block/partitions/mac.c:23:20: warning: unused function 'mac_fix_string' [-Wunused-function]
Signed-off-by Colin Ian King <[email protected]>
--- block/partitions/mac.c | 2 ++ 1 file changed, 2 insertions(+)
block/partitions/mac.c +2 -0
@@ -20,6 +20,7 @@ extern void note_bootable_part(dev_t dev, int part, int goodness);* Code to understand MacOS partition tables. */ +#ifdef CONFIG_PPC_PMAC static inline void mac_fix_string (char *stg,int len) {int i;
@@ -27,6 +28,7 @@ static inline void mac_fix_string(char *stg, int len)for (i = len -1 ; i >=0 && stg[i] ==' ' ; i--) stg[i] = 0; } +#endif int mac_partition (struct parsed_partitions *state) {
Signature · 1 line
2.39.2
Quoted 8 lines · Colin Ian King
The helper function
mac_fix_stringis only required withCONFIG_PPC_PMAC, add #ifCONFIG_PPC_PMACand #endif around the function.Cleans up clang scan build warning:
block/partitions/mac.c:23:20: warning: unused function 'mac_fix_string' [-Wunused-function][...]
Applied, thanks!
[1/1] block: partitions: only define function mac_fix_string for CONFIG_PPC_PMAC
commit: 5205a4aa8fc9454853b705b69611c80e9c644283
Best regards,
Signature · 1 line
Jens Axboe