From 9f87d17561474c56cad7f0d5dcbb81d323eee06e Mon Sep 17 00:00:00 2001 From: Jorge Acereda Date: Fri, 8 May 2020 21:17:25 +0200 Subject: [PATCH] Ignoring system() return value produces warnings on some systems, just return it. --- core/System.carp | 2 +- core/carp_system.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/System.carp b/core/System.carp index a527491e..c6de32f5 100644 --- a/core/System.carp +++ b/core/System.carp @@ -15,7 +15,7 @@ (doc sleep-seconds "Sleeps for a specified number of microseconds.") (register sleep-micros (Fn [Int] ())) (doc system "Performs a system command.") - (register system (Fn [&String] ())) + (register system (Fn [&String] Int)) (doc get-arg "Gets the command line argument at a specified index.") (register get-arg (Fn [Int] (Ref String))) (doc get-args-len "Gets the number of command line arguments.") diff --git a/core/carp_system.h b/core/carp_system.h index 2db61548..48b4b1eb 100644 --- a/core/carp_system.h +++ b/core/carp_system.h @@ -35,8 +35,8 @@ double System_nanotime() { } #endif -void System_system(const String *command) { - system(*command); +int System_system(const String *command) { + return system(*command); } Array System_args;