[alsa-devel] sound/pci/au88x0/au88x0_core.c: many calls to memset with not-plausible size ?

David Binderman dcb314 at hotmail.com
Mon May 2 16:43:15 CEST 2016


Hello there,

sound/pci/au88x0/au88x0_core.c:2153:6: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]

Source code is

                   memset(stream->resources, 0,
                           sizeof(unsigned char) *
                           VORTEX_RESOURCE_LAST);

but

sound/pci/au88x0/au88x0.h:    u32 resources[5];

Something like

                 memset(stream->resources, 0,
                           sizeof(stream->resources[0]) *
                           VORTEX_RESOURCE_LAST);

Some duplicates:

sound/pci/au88x0/au88x0_core.c:2163:7: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
sound/pci/au88x0/au88x0_core.c:2177:5: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
sound/pci/au88x0/au88x0_core.c:2292:5: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
sound/pci/au88x0/au88x0_core.c:2301:5: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]

Regards

David Binderman

 		 	   		  


More information about the Alsa-devel mailing list