[riot-notifications] [RIOT-OS/RIOT] drivers/periph_spi: let spi_acquire return void (#15902)

Marian Buschsieweke notifications at github.com
Thu Sep 2 07:38:29 CEST 2021


@maribu commented on this pull request.



> @@ -78,10 +78,11 @@ void spi_init_pins(spi_t bus)
 #endif
 }
 
-int spi_acquire(spi_t bus, spi_cs_t cs, spi_mode_t mode, spi_clk_t clk)
+void spi_acquire(spi_t bus, spi_cs_t cs, spi_mode_t mode, spi_clk_t clk)
 {
     (void)bus;

Note that if an argument is used by an `assert()` only, it will be unused once the assert is disabled via `NDEBUG`. The reason is that `assert()` is (as required by the C standard) implement as a preprocessor macro.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15902#discussion_r700759829
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210901/587ae74b/attachment-0001.htm>


More information about the notifications mailing list