binderfs: Fix binderfs.c selftest compilation warning
PATCH 1/1 binderfs: Fix binderfs.c selftest compilation warning
Fix missing braces compilation warning in the ARM
compiler environment:
drivers/android/binderfs.c: In function 'binderfs_fill_super':
drivers/android/binderfs.c:650:9: warning: missing braces around initializer [-Wmissing-braces]
struct binderfs_device device_info = { 0 };
drivers/android/binderfs.c:650:9: warning: (near initialization for ‘device_info.name’) [-Wmissing-braces]
--- drivers/android/binderfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/android/binderfs.c +1 -1
@@ -650,7 +650,7 @@ static int binderfs_fill_super(struct super_block *sb, struct fs_context *fc)struct binderfs_info *info;struct binderfs_mount_opts *ctx = fc->fs_private;struct inode *inode =NULL ; -struct binderfs_device device_info = {0 }; +struct binderfs_device device_info = {};const char *name;size_t len;
Signature · 1 line
2.7.4
Quoted 9 lines · Tang Bin
Fix missing braces compilation warning in the ARM
compiler environment:
drivers/android/binderfs.c: In function 'binderfs_fill_super':
drivers/android/binderfs.c:650:9: warning: missing braces around initializer [-Wmissing-braces]
structbinderfs_devicedevice_info= { 0 };
drivers/android/binderfs.c:650:9: warning: (near initialization for ‘device_info.name’) [-Wmissing-braces]Signed-off-by Tang Bin <[email protected]>---
Thanks!
Greg KH
maintainerQuoted 6 lines · Tang Bin
Fix missing braces compilation warning in the ARM
compiler environment:
drivers/android/binderfs.c: In function 'binderfs_fill_super':
drivers/android/binderfs.c:650:9: warning: missing braces around initializer [-Wmissing-braces]
structbinderfs_devicedevice_info= { 0 };
drivers/android/binderfs.c:650:9: warning: (near initialization for ‘device_info.name’) [-Wmissing-braces]
What compiler and version is giving this warning? It's odd we have not seen this yet...
thanks,
greg k-h
Hi greg:
Quoted 9 lines · Greg KH
Quoted 6 lines · Tang Bin
Fix missing braces compilation warning in the ARM
compiler environment:
drivers/android/binderfs.c: In function 'binderfs_fill_super':
drivers/android/binderfs.c:650:9: warning: missing braces around initializer [-Wmissing-braces]
structbinderfs_devicedevice_info= { 0 };
drivers/android/binderfs.c:650:9: warning: (near initialization for ‘device_info.name’) [-Wmissing-braces]What compiler and version is giving this warning? It's odd we have not seen this yet...
My environment:
PC : Ubuntu 16.04
Hardware : I.MX6ULL
Tool Chain : arm-linux-gnueabihf-gcc (Linaro GCC 4.9-2017.01) 4.9.4
Thank you for your patience.
Tang Bin