> Date: Thu, 6 May 2021 19:56:57 +0000
> From: Miod Vallat <m...@online.fr>
> 
> `return f()' when f is a void function is not allowed by the C standard
> but is a gcc extension.

Thanks.  I probably inadvertedly copied that from the read code.
Committed.


> Index: com.c
> ===================================================================
> RCS file: /OpenBSD/src/sys/dev/ic/com.c,v
> retrieving revision 1.173
> diff -u -p -r1.173 com.c
> --- com.c     14 Aug 2020 18:14:11 -0000      1.173
> +++ com.c     6 May 2021 19:55:13 -0000
> @@ -1609,9 +1609,9 @@ com_write_reg(struct com_softc *sc, bus_
>       reg <<= sc->sc_reg_shift;
>  
>       if (sc->sc_reg_width == 4)
> -             return bus_space_write_4(sc->sc_iot, sc->sc_ioh, reg, value);
> +             bus_space_write_4(sc->sc_iot, sc->sc_ioh, reg, value);
>       else
> -             return bus_space_write_1(sc->sc_iot, sc->sc_ioh, reg, value);
> +             bus_space_write_1(sc->sc_iot, sc->sc_ioh, reg, value);
>  }
>  
>  #ifdef COM_CONSOLE
> @@ -1636,9 +1636,9 @@ comcn_write_reg(bus_size_t reg, uint8_t 
>       reg <<= comcons_reg_shift;
>  
>       if (comcons_reg_width == 4)
> -             return bus_space_write_4(comconsiot, comconsioh, reg, value);
> +             bus_space_write_4(comconsiot, comconsioh, reg, value);
>       else
> -             return bus_space_write_1(comconsiot, comconsioh, reg, value);
> +             bus_space_write_1(comconsiot, comconsioh, reg, value);
>  }
>  
>  #endif
> 
> 

Reply via email to