xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] tools/livepatch: initialise j to 0 to make some versions of gcc happy
@ 2016-06-15 13:07 Dongli Zhang
  2016-06-16  8:49 ` Wei Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Dongli Zhang @ 2016-06-15 13:07 UTC (permalink / raw)
  To: xen-devel, konrad.wilk, ross.lagerwall, ian.jackson, wei.liu2

Initialise j to 0 to make some versions of gcc (e.g., gcc4.5/4.3) happy to
avoid compilation error by commit beba3693f7243e68bbe31fe3794da91068eeea5b.

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
---
 tools/misc/xen-livepatch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/misc/xen-livepatch.c b/tools/misc/xen-livepatch.c
index 3162489..62c072e 100644
--- a/tools/misc/xen-livepatch.c
+++ b/tools/misc/xen-livepatch.c
@@ -412,7 +412,7 @@ struct {
 
 int main(int argc, char *argv[])
 {
-    int i, j, ret;
+    int i, j = 0, ret;
 
     if ( argc  <= 1 )
     {
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] tools/livepatch: initialise j to 0 to make some versions of gcc happy
@ 2016-06-16 21:47 Dongli Zhang
  2016-06-17 10:02 ` Wei Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Dongli Zhang @ 2016-06-16 21:47 UTC (permalink / raw)
  To: wei.liu2; +Cc: ross.lagerwall, xen-devel, ian.jackson


> I suggest pasting in Olaf's exact error message here.
> 
> To avoid extra round trip, I propose updating the commit message as
> followed:
> 
>     Initialise j to 0 to make some versions of gcc (e.g., gcc4.5/4.3)
> happy to
>     avoid compilation error by commit
> beba3693f7243e68bbe31fe3794da91068eeea5b.
>     
>     Failure manifests with gcc 4.5 as:
>     
>     [  153s] cc1: warnings being treated as errors
>     [  153s] xen-livepatch.c: In function 'main':
>     [  153s] xen-livepatch.c:415:12: error: 'j' may be used
> uninitialized in this function
>     [  153s] make[3]: *** [xen-livepatch.o] Error 1
> 
> If you agree with this I will handle the updating while doing my next
> sweep.


Sure. Feel free to update the commit message.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

end of thread, other threads:[~2016-06-17 10:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-15 13:07 [PATCH 1/1] tools/livepatch: initialise j to 0 to make some versions of gcc happy Dongli Zhang
2016-06-16  8:49 ` Wei Liu
2016-06-16 21:47 Dongli Zhang
2016-06-17 10:02 ` Wei Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).