Skip to content
Snippets Groups Projects
Forked from Alex Deucher / linux
Source project has a limited visibility.
  • Lee Jones's avatar
    66d5b034
    hwmon: (ibmpowernv) Silence strncpy() warning · 66d5b034
    Lee Jones authored
    
    Fixes the following W=1 kernel build warning(s):
    
     from drivers/hwmon/ibmpowernv.c:11:
     In function ‘strncpy’,
     inlined from ‘get_sensor_index_attr’ at drivers/hwmon/ibmpowernv.c:243:2,
     inlined from ‘create_device_attrs’ at drivers/hwmon/ibmpowernv.c:280:8:
     include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
     297 | #define __underlying_strncpy __builtin_strncpy
     | ^
     include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’
     307 | return __underlying_strncpy(p, q, size);
     | ^~~~~~~~~~~~~~~~~~~~
    
    Cc: Jean Delvare <jdelvare@suse.com>
    Cc: Guenter Roeck <linux@roeck-us.net>
    Cc: Michael Ellerman <mpe@ellerman.id.au>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
    Cc: linux-hwmon@vger.kernel.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
    Link: https://lore.kernel.org/r/20201112095715.1993117-4-lee.jones@linaro.org
    
    
    Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
    66d5b034
    History
    hwmon: (ibmpowernv) Silence strncpy() warning
    Lee Jones authored
    
    Fixes the following W=1 kernel build warning(s):
    
     from drivers/hwmon/ibmpowernv.c:11:
     In function ‘strncpy’,
     inlined from ‘get_sensor_index_attr’ at drivers/hwmon/ibmpowernv.c:243:2,
     inlined from ‘create_device_attrs’ at drivers/hwmon/ibmpowernv.c:280:8:
     include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
     297 | #define __underlying_strncpy __builtin_strncpy
     | ^
     include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’
     307 | return __underlying_strncpy(p, q, size);
     | ^~~~~~~~~~~~~~~~~~~~
    
    Cc: Jean Delvare <jdelvare@suse.com>
    Cc: Guenter Roeck <linux@roeck-us.net>
    Cc: Michael Ellerman <mpe@ellerman.id.au>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
    Cc: linux-hwmon@vger.kernel.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
    Link: https://lore.kernel.org/r/20201112095715.1993117-4-lee.jones@linaro.org
    
    
    Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>