Linux virtualization list
 help / color / mirror / Atom feed
* [PATCH] vhost: Storage class should be before const qualifier
@ 2010-05-17 13:12 Tobias Klauser
  2010-05-17 13:13 ` Michael S. Tsirkin
  0 siblings, 1 reply; 3+ messages in thread
From: Tobias Klauser @ 2010-05-17 13:12 UTC (permalink / raw)
  To: mst; +Cc: kvm, virtualization, netdev, Tobias Klauser

The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 drivers/vhost/net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index aa88911..cd36f5f 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -626,7 +626,7 @@ static long vhost_net_compat_ioctl(struct file *f, unsigned int ioctl,
 }
 #endif
 
-const static struct file_operations vhost_net_fops = {
+static const struct file_operations vhost_net_fops = {
 	.owner          = THIS_MODULE,
 	.release        = vhost_net_release,
 	.unlocked_ioctl = vhost_net_ioctl,
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] vhost: Storage class should be before const qualifier
  2010-05-17 13:12 [PATCH] vhost: Storage class should be before const qualifier Tobias Klauser
@ 2010-05-17 13:13 ` Michael S. Tsirkin
  2010-05-17 13:27   ` Tobias Klauser
  0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2010-05-17 13:13 UTC (permalink / raw)
  To: Tobias Klauser; +Cc: kvm, virtualization, netdev

On Mon, May 17, 2010 at 03:12:49PM +0200, Tobias Klauser wrote:
> The C99 specification states in section 6.11.5:
> 
> The placement of a storage-class specifier other than at the beginning
> of the declaration specifiers in a declaration is an obsolescent
> feature.
> 
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>


Will apply, thanks!
Just to clarify: does some compiler/checker actually barf on this?

> ---
>  drivers/vhost/net.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
> index aa88911..cd36f5f 100644
> --- a/drivers/vhost/net.c
> +++ b/drivers/vhost/net.c
> @@ -626,7 +626,7 @@ static long vhost_net_compat_ioctl(struct file *f, unsigned int ioctl,
>  }
>  #endif
>  
> -const static struct file_operations vhost_net_fops = {
> +static const struct file_operations vhost_net_fops = {
>  	.owner          = THIS_MODULE,
>  	.release        = vhost_net_release,
>  	.unlocked_ioctl = vhost_net_ioctl,
> -- 
> 1.6.3.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] vhost: Storage class should be before const qualifier
  2010-05-17 13:13 ` Michael S. Tsirkin
@ 2010-05-17 13:27   ` Tobias Klauser
  0 siblings, 0 replies; 3+ messages in thread
From: Tobias Klauser @ 2010-05-17 13:27 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: kvm, virtualization, netdev

On 2010-05-17 at 15:13:35 +0200, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Mon, May 17, 2010 at 03:12:49PM +0200, Tobias Klauser wrote:
> > The C99 specification states in section 6.11.5:
> > 
> > The placement of a storage-class specifier other than at the beginning
> > of the declaration specifiers in a declaration is an obsolescent
> > feature.
> > 
> > Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> 
> 
> Will apply, thanks!
> Just to clarify: does some compiler/checker actually barf on this?

GCC does emit a warning if the options '-std=c99 -W -Wall' are present.
ICC also does warn about this, though I don't know whether this depends
on any commandline options.

Cheers
Tobias

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-17 13:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-17 13:12 [PATCH] vhost: Storage class should be before const qualifier Tobias Klauser
2010-05-17 13:13 ` Michael S. Tsirkin
2010-05-17 13:27   ` Tobias Klauser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox