]> sigrok.org Git - libserialport.git/commitdiff
Fix two compiler warnings on platforms without enumeration support.
authorUwe Hermann <redacted>
Fri, 3 Apr 2015 20:03:26 +0000 (22:03 +0200)
committerUwe Hermann <redacted>
Fri, 3 Apr 2015 20:11:07 +0000 (22:11 +0200)
  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;
                     ^

serialport.c

index 5183a85068d431996f970d9f714540b7c0ee9288..9826df45597711d4e81a6566cf81590e8128922e 100644 (file)
@@ -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);