From: Uwe Hermann Date: Fri, 3 Apr 2015 20:03:26 +0000 (+0200) Subject: Fix two compiler warnings on platforms without enumeration support. X-Git-Tag: libserialport-0.1.1~68 X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=23e7fa372a0a48d8f764de93d485af4c1316b124;p=libserialport.git Fix two compiler warnings on platforms without enumeration support. serialport.c: In function 'sp_list_ports': serialport.c:326:6: warning: unused variable 'ret' [-Wunused-variable] int ret; ^ serialport.c:325:19: warning: unused variable 'list' [-Wunused-variable] struct sp_port **list; ^ --- diff --git a/serialport.c b/serialport.c index 5183a85..9826df4 100644 --- a/serialport.c +++ b/serialport.c @@ -322,8 +322,10 @@ fail: SP_API enum sp_return sp_list_ports(struct sp_port ***list_ptr) { +#ifndef NO_ENUMERATION struct sp_port **list; int ret; +#endif TRACE("%p", list_ptr);