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 Mon, Jul 7, 2014 at 8:09 AM, Ben Pfaff <b...@nicira.com> wrote: > 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 >> 2. ../lib/util.c:463:5: error: ISO C90 forbids mixed declarations >> and code [-Werror=declaration-after-statement] (affected only >> branch-2.3 that is C90 compliant and not the master) >> >> Reported-By: Joe Stringer <jstrin...@nicira.com> >> Reported-By: Lorand Jakab <loja...@cisco.com> >> Signed-Off-By: Ansis Atteka <aatt...@nicira.com> > > I don't see any warnings on current master. Did Yamamoto-san's commit > (util: Suppress a warning by adding CONST_CAST) fix them? _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev