[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] build: fix build of variables.c
From: |
Eric Blake |
Subject: |
Re: [PATCH] build: fix build of variables.c |
Date: |
Fri, 17 Apr 2015 11:42:23 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 04/17/2015 11:38 AM, Eric Blake wrote:
> On 04/17/2015 11:01 AM, Chet Ramey wrote:
>> On 4/17/15 10:26 AM, Eric Blake wrote:
>>> gcc -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"x86_64"'
>>> -DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"x86_64-unknown-linux-gnu"'
>>> -DCONF_VENDOR='"unknown"' -DLOCALEDIR='"/usr/local/share/locale"'
>>> -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -DDEBUG -DMALLOC_DEBUG -I. -I.
>>> -I./include -I./lib -g -O2 -Wno-parentheses -Wno-format-security -c
>>> variables.c
>>> variables.c: In function ‘initialize_shell_variables’:
>>> variables.c:425:7: error: ‘else’ without a previous ‘if’
>>> else
>>> ^
>>
>> What non-default options did you enable when you attempted the build?
>
> None that I recall (merely git checkout, ./configure; make). Maybe it
> had something to do with the fact that I had been incrementally building
> from earlier points in the tree, as a fresh checkout doesn't seem to
> reproduce the problem?
At any rate, even if I can't easily reproduce the setup, it's fairly
obvious that if FUNCTION_IMPORT is undefined, as well as either
ARRAY_VARS or ARRAY_EXPORT, that you indeed do get an unbalanced 'else'
unless you group the 'else' to go inside the '#if' that introduces the
'if'. So even if I can't provide an easy formula for reproduction, the
patch should still be valid.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature