avoid clang -Wsometimes-uninitialized warnings in fms(4)
authorjsg <jsg@openbsd.org>
Tue, 23 Nov 2021 00:17:59 +0000 (00:17 +0000)
committerjsg <jsg@openbsd.org>
Tue, 23 Nov 2021 00:17:59 +0000 (00:17 +0000)
feedback and ok millert@

sys/dev/ic/tea5757.c
sys/dev/pci/fmsradio.c

index 3a4bafa..28fcd86 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: tea5757.c,v 1.3 2002/01/07 18:32:19 mickey Exp $      */
+/*     $OpenBSD: tea5757.c,v 1.4 2021/11/23 00:17:59 jsg Exp $ */
 
 /*
  * Copyright (c) 2001 Vladimir Popov <jumbo@narod.ru>
@@ -159,7 +159,7 @@ tea5757_encode_lock(u_int8_t lock)
                ret = TEA5757_S010;
        else if (lock > 14 && lock < 51)
                ret = TEA5757_S030;
-       else if (lock > 50)
+       else
                ret = TEA5757_S150;
 
        return ret;
index 5ab13f2..b87e848 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: fmsradio.c,v 1.6 2002/06/06 16:29:37 mickey Exp $     */
+/*     $OpenBSD: fmsradio.c,v 1.7 2021/11/23 00:17:59 jsg Exp $        */
 
 /*
  * Copyright (c) 2002 Vladimir Popov <jumbo@narod.ru>
@@ -537,7 +537,7 @@ fmsradio_get_info(void *v, struct radio_info *ri)
                ri->info |= buf & PCR_INFO_STEREO ? 0 : RADIO_INFO_STEREO;
                break;
        default:
-               break;
+               return EINVAL;
        }
 
        ri->freq = radio->freq = tea5757_decode_freq(buf,