From 34fa12eddea3fc1ee858bbaa58c89d68a1a712f0 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Wed, 20 Aug 2025 11:32:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20`xy=5Fnoop()`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/xy.h | 1 + src/framework/core.c | 2 +- src/recipe/ware/Homebrew/Homebrew.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/xy.h b/lib/xy.h index 64def75..e81d492 100644 --- a/lib/xy.h +++ b/lib/xy.h @@ -102,6 +102,7 @@ bool xy_enable_color = true; #define xy_unsupported() assert(!"Unsuppoted") #define xy_unimplemented() assert(!"Unimplemented temporarily") #define xy_unreached() assert(!"This code shouldn't be reached") +#define xy_noop() (void)0 static void _xy_print_int (int n) {printf ("%d", n);} static void _xy_print_long (long n) {printf ("%ld", n);} diff --git a/src/framework/core.c b/src/framework/core.c index 47d44b6..fb7ec9a 100644 --- a/src/framework/core.c +++ b/src/framework/core.c @@ -1509,7 +1509,7 @@ chsrc_view_env (const char *var1, ...) */ // chsrc_run (cmd, RunOpt_Dont_Notify_On_Success|RunOpt_No_Last_New_Line|RunOpt_Dont_Abort_On_Failure); int status = system (cmd); - if (status!=0) {/* NOOP */} + if (status!=0) { xy_noop(); } } else { diff --git a/src/recipe/ware/Homebrew/Homebrew.c b/src/recipe/ware/Homebrew/Homebrew.c index 525cd69..fedb71d 100644 --- a/src/recipe/ware/Homebrew/Homebrew.c +++ b/src/recipe/ware/Homebrew/Homebrew.c @@ -43,7 +43,7 @@ void wr_homebrew_getsrc (char *option) { int status = system (RAWSTR_wr_homebrew_read_config_cmd); - if (status != 0) { /* NOOP */ } + if (status != 0) { xy_noop(); } } /**