From: Uwe Hermann Date: Fri, 3 Apr 2015 15:45:04 +0000 (+0200) Subject: Fix a compiler warning. X-Git-Tag: libserialport-0.1.1~70 X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;h=e019e72ec0bb04cb52d6b14810485ea8d96a97ee;p=libserialport.git Fix a compiler warning. 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] --- diff --git a/libserialport_internal.h b/libserialport_internal.h index 27fae2a..6a8c877 100644 --- a/libserialport_internal.h +++ b/libserialport_internal.h @@ -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);