[libvirt] [PATCH 2/2] nwfilter: enum cleanups in "src/nwfilter/*"
Eric Blake
eblake at redhat.com
Tue Jun 24 19:03:55 UTC 2014
On 06/24/2014 01:02 PM, Eric Blake wrote:
> On 06/15/2014 10:32 AM, Julio Faracco wrote:
>> As we are doing with the enum structures, a cleanup in
>> "src/nwfilter/" directory was done now. All the enums that were
>> defined in the header files were converted to typedefs in this
>> directory. This patch includes all the adjustments to remove
>> conflicts when you do this kind of change. "Enum-to-typedef"'s
>> conversions were made in "src/nwfilter/nwfilter_{gentech_driver,
>> learnipaddr, tech_driver}.h".
>>
>> Signed-off-by: Julio Faracco <jcfaracco at gmail.com>
>> ---
>> src/nwfilter/nwfilter_gentech_driver.c | 12 ++++++------
>> src/nwfilter/nwfilter_gentech_driver.h | 4 ++--
>> src/nwfilter/nwfilter_learnipaddr.c | 2 +-
>> src/nwfilter/nwfilter_learnipaddr.h | 8 ++++----
>> src/nwfilter/nwfilter_tech_driver.h | 6 +++---
>> 5 files changed, 16 insertions(+), 16 deletions(-)
>>
>>
>> -enum techDrvFlags {
>> +typedef enum {
>> TECHDRV_FLAG_INITIALIZED = (1 << 0),
>> -};
>> +} techDrvFlags;
>
> Also this enum.
>
> At any rate, your patch is a strict improvement, so ACK and pushed.
I spoke too soon. Your patch failed to build:
CC nwfilter/libvirt_driver_nwfilter_impl_la-nwfilter_learnipaddr.lo
nwfilter/nwfilter_learnipaddr.c:329:19: error: 'enum howDetect' declared
inside parameter list [-Werror]
enum howDetect *howDetected)
^
nwfilter/nwfilter_learnipaddr.c:329:19: error: its scope is only this
definition or declaration, which is probably not what you want [-Werror]
nwfilter/nwfilter_learnipaddr.c: In function 'procDHCPOpts':
nwfilter/nwfilter_learnipaddr.c:353:21: error: dereferencing pointer to
incomplete type
*howDetected = DETECT_DHCP;
^
nwfilter/nwfilter_learnipaddr.c: In function 'learnIPAddressThread':
nwfilter/nwfilter_learnipaddr.c:398:10: error: variable 'howDetected'
has initializer but incomplete type
enum howDetect howDetected = 0;
^
Please respin the patch, and when posting v2, it would be nice to
include the renames into the right namespace prefix.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140624/87dc0991/attachment-0001.sig>
More information about the libvir-list
mailing list