]> sigrok.org Git - libserialport.git/commitdiff
Fix a compiler warning.
authorUwe Hermann <redacted>
Fri, 3 Apr 2015 15:45:04 +0000 (17:45 +0200)
committerUwe Hermann <redacted>
Fri, 3 Apr 2015 18:50:22 +0000 (20:50 +0200)
This fixes the following scan-build warning:

  serialport.c: In function 'sp_list_ports':
  serialport.c:354:1: warning: control reaches end of non-void function [-Wreturn-type]

libserialport_internal.h

index 27fae2a128569a309d912f2541b3183be176e309..6a8c877262720f179a543151fa1ff7b41ba00f5e 100644 (file)
@@ -192,6 +192,7 @@ extern void (*sp_debug_handler)(const char *format, ...);
        case SP_ERR_FAIL: RETURN_CODE(SP_ERR_FAIL); \
        case SP_ERR_MEM: RETURN_CODE(SP_ERR_MEM); \
        case SP_ERR_SUPP: RETURN_CODE(SP_ERR_SUPP); \
+       default: RETURN_CODE(SP_ERR_FAIL); \
        } \
 } while (0)
 #define RETURN_OK() RETURN_CODE(SP_OK);