"-Wall" option doesn't work

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

"-Wall" option doesn't work

Xu, Anthony
Hi all,
        I have been wondering why "-Wall" option doesn't work, and I had
suffered much from this. Without -Wall, gcc will not complain about
missing prototype etc., for example, assume function A return type is
unsigned long, according to calling convention, if function A is called
and there is no prototype, the return type will be int by default, which
is 4 type. This kind of issue is hard to debug. Below small patch make
"-Wall" take effect, seems "-w" overwrites "-Wall", then you recompile,
you will find a lot of warning messages like redefinition, missing
prototype etc. I would like to remove all these warning message, but all
my hands are full.

Anyone would like to volunteer; this will help community a lot.


diff -r 5bd5121efa22 xen/arch/ia64/Rules.mk
--- a/xen/arch/ia64/Rules.mk    Wed Jan 11 05:57:14 2006
+++ b/xen/arch/ia64/Rules.mk    Thu Jan 12 09:08:44 2006
@@ -26,7 +26,7 @@
 CFLAGS  += -Wno-pointer-arith -Wredundant-decls
 CFLAGS  += -DIA64 -DXEN -DLINUX_2_6 -DV_IOSAPIC_READY
 CFLAGS += -ffixed-r13 -mfixed-range=f12-f15,f32-f127
-CFLAGS += -w -g
+CFLAGS += -g
 


Thanks,
-Anthony


_______________________________________________
Xen-ia64-devel mailing list
[hidden email]
http://lists.xensource.com/xen-ia64-devel
Reply | Threaded
Open this post in threaded view
|

Re: "-Wall" option doesn't work

Tristan Gingold
Le Jeudi 12 Janvier 2006 02:33, Xu, Anthony a écrit :

> Hi all,
> I have been wondering why "-Wall" option doesn't work, and I had
> suffered much from this. Without -Wall, gcc will not complain about
> missing prototype etc., for example, assume function A return type is
> unsigned long, according to calling convention, if function A is called
> and there is no prototype, the return type will be int by default, which
> is 4 type. This kind of issue is hard to debug. Below small patch make
> "-Wall" take effect, seems "-w" overwrites "-Wall", then you recompile,
> you will find a lot of warning messages like redefinition, missing
> prototype etc. I would like to remove all these warning message, but all
> my hands are full.
I have already sent two patches enabling warnings.

The first one was very big (140KB) and Dan rejected it almost for this reason.

The second one was rather small (4KB) and fixed the most boring warnings (the
most obvious and those in .h files which appear in every file). It was not
accepted (without explaination).

I am not sure Dan is interested in warnings.

For sure, fixing warnings is *very* boring.  Some are in fact bugs: function
called with less arguments, very dubious casts...
I really think warnings must be enabled and the earlier is the better.

Tristan.



_______________________________________________
Xen-ia64-devel mailing list
[hidden email]
http://lists.xensource.com/xen-ia64-devel
Reply | Threaded
Open this post in threaded view
|

RE: "-Wall" option doesn't work

Tian, Kevin
In reply to this post by Xu, Anthony
>From: Tristan Gingold
>Sent: 2006年1月12日 17:37
>I have already sent two patches enabling warnings.
>
>The first one was very big (140KB) and Dan rejected it almost for this reason.
>
>The second one was rather small (4KB) and fixed the most boring warnings (the
>most obvious and those in .h files which appear in every file). It was not
>accepted (without explaination).
>
>I am not sure Dan is interested in warnings.

Hi, Tristan,
        I think above patches to fix warning are very important and always welcomed for stability. Maybe Dan was in busy with other more important threads at time you sent out them. Could you re-send them out?

>
>For sure, fixing warnings is *very* boring.  Some are in fact bugs: function
>called with less arguments, very dubious casts...
>I really think warnings must be enabled and the earlier is the better.
>
>Tristan.

Absolutely agree.

Thanks,
Kevin

_______________________________________________
Xen-ia64-devel mailing list
[hidden email]
http://lists.xensource.com/xen-ia64-devel
Reply | Threaded
Open this post in threaded view
|

RE: "-Wall" option doesn't work

Zhang, Xiantao
In reply to this post by Xu, Anthony
Hi Anthony,
I am also working on this issue now. Fixing these warnings as Tristan said is very boring indeed. Since Tristan have made the patch for it, and I won't spend more time on this again. OK? :)

Zhang Xiantao
CSD-OTC PRC Virtualization
Intel (China) Limited

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Tian, Kevin
Sent: 2006年1月12日 16:45
To: Tristan Gingold; Xu, Anthony; [hidden email]
Subject: RE: [Xen-ia64-devel] "-Wall" option doesn't work

>From: Tristan Gingold
>Sent: 2006年1月12日 17:37
>I have already sent two patches enabling warnings.
>
>The first one was very big (140KB) and Dan rejected it almost for this reason.
>
>The second one was rather small (4KB) and fixed the most boring warnings (the
>most obvious and those in .h files which appear in every file). It was not
>accepted (without explaination).
>
>I am not sure Dan is interested in warnings.

Hi, Tristan,
        I think above patches to fix warning are very important and always welcomed for stability. Maybe Dan was in busy with other more important threads at time you sent out them. Could you re-send them out?

>
>For sure, fixing warnings is *very* boring.  Some are in fact bugs: function
>called with less arguments, very dubious casts...
>I really think warnings must be enabled and the earlier is the better.
>
>Tristan.

Absolutely agree.

Thanks,
Kevin

_______________________________________________
Xen-ia64-devel mailing list
[hidden email]
http://lists.xensource.com/xen-ia64-devel

_______________________________________________
Xen-ia64-devel mailing list
[hidden email]
http://lists.xensource.com/xen-ia64-devel
Reply | Threaded
Open this post in threaded view
|

PATCH for warnings; was "-Wall" option doesn't work

Tristan Gingold
In reply to this post by Tian, Kevin
Le Jeudi 12 Janvier 2006 09:44, Tian, Kevin a écrit :

> I think above patches to fix warning are very important and always
> welcomed for stability. Maybe Dan was in busy with other more important
> threads at time you sent out them. Could you re-send them out?
>
> >For sure, fixing warnings is *very* boring.  Some are in fact bugs:
> > function called with less arguments, very dubious casts...
> >I really think warnings must be enabled and the earlier is the better.
> >
> >Tristan.
>
> Absolutely agree.
Hi,

here is the (small) patch which enable warnings and fixes those which occurs
in every file.
This is really a minimal patch. I think this is a good start point.

Tristan.

_______________________________________________
Xen-ia64-devel mailing list
[hidden email]
http://lists.xensource.com/xen-ia64-devel

xen-warns3.diffs (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: PATCH for warnings; was "-Wall" option doesn't work

Dan Magenheimer
I tested this patch and was about to commit it but noticed
that there was no "Signed-off-by" line.  In support of
Kevin's message the other day and Xen patch standards,
could I ask you to please resend the patch with a valid
"Signed-off-by" line?  If there are no other changes in
the patch file, I will commit it without further testing.

Thanks,
Dan

> -----Original Message-----
> From: Tristan Gingold [mailto:[hidden email]]
> Sent: Thursday, January 12, 2006 4:53 AM
> To: Tian, Kevin; Xu, Anthony;
> [hidden email]; Magenheimer, Dan (HP Labs
> Fort Collins)
> Subject: PATCH for warnings; was "-Wall" option doesn't work
>
> Le Jeudi 12 Janvier 2006 09:44, Tian, Kevin a écrit :
> > I think above patches to fix warning are very important
> and always
> > welcomed for stability. Maybe Dan was in busy with other
> more important
> > threads at time you sent out them. Could you re-send them out?
> >
> > >For sure, fixing warnings is *very* boring.  Some are in fact bugs:
> > > function called with less arguments, very dubious casts...
> > >I really think warnings must be enabled and the earlier is
> the better.
> > >
> > >Tristan.
> >
> > Absolutely agree.
> Hi,
>
> here is the (small) patch which enable warnings and fixes
> those which occurs
> in every file.
> This is really a minimal patch. I think this is a good start point.
>
> Tristan.
>

_______________________________________________
Xen-ia64-devel mailing list
[hidden email]
http://lists.xensource.com/xen-ia64-devel
Reply | Threaded
Open this post in threaded view
|

Re: PATCH for warnings; was "-Wall" option doesn't work

Tristan Gingold
Le Vendredi 13 Janvier 2006 00:41, Magenheimer, Dan (HP Labs Fort Collins) a
écrit :
> I tested this patch and was about to commit it but noticed
> that there was no "Signed-off-by" line.  In support of
> Kevin's message the other day and Xen patch standards,
> could I ask you to please resend the patch with a valid
> "Signed-off-by" line?  If there are no other changes in
> the patch file, I will commit it without further testing.
Hi,

I think I miss something.  There is a Signed-off-by line in the patch:
  # HG changeset patch
  # User tristan.gingold@xxxxxxxx
  # Node ID 34a8366f42ac3347face862e5f59a3f3aeff8589
  # Parent  1507c5499a92a7701db9cc3b0bf9ac5fb3fa8ee2
  Enable warnings and fix a few one (those which occur in almost every file).
  The next step is to fix warnings one by one.

  Signed-off-by: Tristan Gingold <tristan.gingold@xxxxxxxx>

  diff -r 1507c5499a92 -r 34a8366f42ac xen/arch/ia64/Rules.mk
  --- a/xen/arch/ia64/Rules.mk Fri Jan  6 18:39:28 2006
  +++ b/xen/arch/ia64/Rules.mk Thu Jan 12 07:58:30 2006
  @@ -23,10 +23,10 @@
Maybe this is the wrong place ?  In the Kevin's message, the place of the
Signed-off-by line is not very explicit and I thought it should be placed in
the patch commit message.

Tristan.


_______________________________________________
Xen-ia64-devel mailing list
[hidden email]
http://lists.xensource.com/xen-ia64-devel
Reply | Threaded
Open this post in threaded view
|

RE: PATCH for warnings; was "-Wall" option doesn't work

Dan Magenheimer
In reply to this post by Tristan Gingold
Sorry, my mistake.  I tested xen-warn3.diffs but when
I did an "hg commit", for cut-paste of your comments,
I accidentally vi'ed your old xen-warn.diffs file.

Now committed.

> -----Original Message-----
> From: Tristan Gingold [mailto:[hidden email]]
> Sent: Friday, January 13, 2006 3:00 AM
> To: Magenheimer, Dan (HP Labs Fort Collins); Tian, Kevin; Xu,
> Anthony; [hidden email]
> Subject: Re: PATCH for warnings; was "-Wall" option doesn't work
>
> Le Vendredi 13 Janvier 2006 00:41, Magenheimer, Dan (HP Labs
> Fort Collins) a
> écrit :
> > I tested this patch and was about to commit it but noticed
> > that there was no "Signed-off-by" line.  In support of
> > Kevin's message the other day and Xen patch standards,
> > could I ask you to please resend the patch with a valid
> > "Signed-off-by" line?  If there are no other changes in
> > the patch file, I will commit it without further testing.
> Hi,
>
> I think I miss something.  There is a Signed-off-by line in the patch:
>   # HG changeset patch
>   # User tristan.gingold@xxxxxxxx
>   # Node ID 34a8366f42ac3347face862e5f59a3f3aeff8589
>   # Parent  1507c5499a92a7701db9cc3b0bf9ac5fb3fa8ee2
>   Enable warnings and fix a few one (those which occur in
> almost every file).
>   The next step is to fix warnings one by one.
>
>   Signed-off-by: Tristan Gingold <tristan.gingold@xxxxxxxx>
>
>   diff -r 1507c5499a92 -r 34a8366f42ac xen/arch/ia64/Rules.mk
>   --- a/xen/arch/ia64/Rules.mk Fri Jan  6 18:39:28 2006
>   +++ b/xen/arch/ia64/Rules.mk Thu Jan 12 07:58:30 2006
>   @@ -23,10 +23,10 @@
> Maybe this is the wrong place ?  In the Kevin's message, the
> place of the
> Signed-off-by line is not very explicit and I thought it
> should be placed in
> the patch commit message.
>
> Tristan.
>
>

_______________________________________________
Xen-ia64-devel mailing list
[hidden email]
http://lists.xensource.com/xen-ia64-devel