lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 Dec 2013 16:21:06 -0000
From:	"David Laight" <David.Laight@...LAB.COM>
To:	"Rashika Kheria" <rashika.kheria@...il.com>,
	<linux-kernel@...r.kernel.org>
Cc:	"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
	<linux-usb@...r.kernel.org>, <josh@...htriplett.org>
Subject: RE: [PATCH 3/7] drivers: usb: Include appropriate header file in hcd.h

> From: Rashika Kheria
> Include header file include/linux/usb.h in include/linux/usb/hcd.h
> because structures usb_device, usb_host_config and usb_interface have
> their definitions in include/linux/usb.h.
> 
> This eliminates the following warning in include/linux/usb/hcd.h:
> include/linux/usb/hcd.h:311:44: warning: ‘struct usb_device’ declared inside parameter list [enabled
> by default]
> include/linux/usb/hcd.h:412:10: warning: ‘struct usb_host_config’ declared inside parameter list
> [enabled by default]
> include/linux/usb/hcd.h:614:9: warning: ‘struct usb_interface’ declared inside parameter list [enabled
> by default]

All it is necessary to do is add a declaration of the struct before the function definition.
There is no need to include the definition of the structure.
It is a shame that gcc doesn't defer this warning to any call site
(where an incorrect type would get passed).

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ