代码拉取完成,页面将自动刷新
From f70d5f0de62114cfcd8d8b5032138111730665e6 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Mon, 16 Sep 2019 21:06:28 +0200
Subject: [PATCH 08/10] =?UTF-8?q?rt-tests:=20cyclictest:=20Fix=20=20warnin?=
=?UTF-8?q?g:=20=E2=80=98cpu=E2=80=99=20may=20be=20used=20uninitialized?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fix warning 'cpu' maybe uninitialized by giving it a default value in
the switch statement. Note, this is a false positive, but documenting
the default value in the switch statement isn't a bad thing.
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/cyclictest/cyclictest.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 72fb35da3238..3a78912b34f8 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -1897,6 +1897,7 @@ int main(int argc, char **argv)
printf("Thread %d using cpu %d.\n", i, cpu);
break;
case AFFINITY_USEALL: cpu = i % max_cpus; break;
+ default: cpu = -1;
}
node = -1;
--
2.20.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。