From: Stephen Hemminger Date: Wed, 28 Jun 2023 23:33:10 +0000 (-0700) Subject: ss: fix warning about empty if() X-Git-Tag: v6.5.0~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27dce6de940ab8b65bea4a41629af8ebe854232f;p=thirdparty%2Fiproute2.git ss: fix warning about empty if() With all warnings enabled gcc wants brackets around the empty if() clause. "Yes I really want an empty clause" Signed-off-by: Stephen Hemminger --- diff --git a/misc/ss.c b/misc/ss.c index de02fccb5..e9d813596 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -627,8 +627,9 @@ static void user_ent_hash_build_task(char *path, int pid, int tid) fp = fopen(stat, "r"); if (fp) { - if (fscanf(fp, "%*d (%[^)])", task) < 1) + if (fscanf(fp, "%*d (%[^)])", task) < 1) { ; /* ignore */ + } fclose(fp); } }