Re: [ovs-dev] [PATCH] util: fix compile warnings

2014-07-07 Thread Ansis Atteka
On Sun, Jul 6, 2014 at 3:37 PM, Joe Stringer wrote: > I feel like this is easier to follow if there's only one #ifdef block. Thanks for pointing this out. This can actually be factorized out even more by taking out free(program_name) out of both #ifdefs. Will send v2 patch soon. > > We could comb

Re: [ovs-dev] [PATCH] util: fix compile warnings

2014-07-07 Thread Ansis Atteka
Yes, Yamamoto-san's patch fixed warning by using CONST_CAST. I think changing "program_name" type to "char*" could be a cleaner solution. However, it does not address the second issue for branch-2.3 (ISO C90 forbids mixed declarations and code). This same issue is not present in master though. On

Re: [ovs-dev] [PATCH] util: fix compile warnings

2014-07-07 Thread Ben Pfaff
On Fri, Jul 04, 2014 at 12:33:03PM -0700, Ansis Atteka wrote: > This patch fixes two compile warnings introduced by commit > 64b73291 ("util: create a copy of program_name"): > 1. ../lib/util.c:457:5: error: passing argument 1 of 'free' >discards 'const' qualifier from pointer target type; And

Re: [ovs-dev] [PATCH] util: fix compile warnings

2014-07-06 Thread Joe Stringer
I feel like this is easier to follow if there's only one #ifdef block. We could combine the blocks and make the two platforms more aligned with something like this (based against master): diff --git a/lib/util.c b/lib/util.c index 4f9b079..c65051d 100644 --- a/lib/util.c +++ b/lib/util.c @@ -43,7

[ovs-dev] [PATCH] util: fix compile warnings

2014-07-04 Thread Ansis Atteka
This patch fixes two compile warnings introduced by commit 64b73291 ("util: create a copy of program_name"): 1. ../lib/util.c:457:5: error: passing argument 1 of 'free' discards 'const' qualifier from pointer target type; And 2. ../lib/util.c:463:5: error: ISO C90 forbids mixed declarations a