From 5264a6eac109b83b799dc45c7cc99729090075b6 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Thu, 6 Dec 2018 22:33:30 -0600 Subject: Fix Truncation warning cpufreq-linux.c->cpufreq_available_governors limit cpu identifer to 0xFFFF Change-Id: I6fb170aa7ce32b7b5c0366bbd689878bb5069be8 --- firmware/target/hosted/cpufreq-linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'firmware/target/hosted/cpufreq-linux.c') diff --git a/firmware/target/hosted/cpufreq-linux.c b/firmware/target/hosted/cpufreq-linux.c index 55a0bf3292..d622cf1d74 100644 --- a/firmware/target/hosted/cpufreq-linux.c +++ b/firmware/target/hosted/cpufreq-linux.c @@ -60,7 +60,7 @@ void cpufreq_available_governors(char* governors, int governors_size, int cpu) snprintf(available_governors_interface, sizeof(available_governors_interface), "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_available_governors", - cpu); + cpu & 0xFFFF); FILE *f = open_read(available_governors_interface); if(f == NULL) -- cgit v1.2.3