From 4365207bcb49d8b467352ba3c8247519df7bcfd9 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Wed, 4 May 2022 18:26:51 +0300 Subject: [PATCH] r2t2 : fix compile warning --- examples/r2t2/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/r2t2/main.cpp b/examples/r2t2/main.cpp index 7c9e416..68008d2 100644 --- a/examples/r2t2/main.cpp +++ b/examples/r2t2/main.cpp @@ -30,7 +30,10 @@ void processTone(int fd, double freq_hz, long duration_ms, bool useBeep, bool pr if (useBeep) { static char cmd[128]; snprintf(cmd, 128, "beep -f %g -l %ld", freq_hz, duration_ms); - system(cmd); + int ret = system(cmd); + if (ret != 0) { + printf("system(\"%s\") failed with %d\n", cmd, ret); + } return; }