mirror of
https://github.com/anrieff/libcpuid
synced 2025-01-23 20:06:41 +00:00
Fix unused parameters
This commit is contained in:
parent
d8c3f3365a
commit
feccd8f7c8
4 changed files with 10 additions and 14 deletions
|
@ -30,7 +30,7 @@ if(UNIX)
|
||||||
set(exec_prefix "\${prefix}")
|
set(exec_prefix "\${prefix}")
|
||||||
set(libdir "\${exec_prefix}/lib")
|
set(libdir "\${exec_prefix}/lib")
|
||||||
set(includedir "\${prefix}/include")
|
set(includedir "\${prefix}/include")
|
||||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wuninitialized -Wstrict-prototypes -Wformat -Wformat-security")
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wuninitialized -Wstrict-prototypes -Wformat -Wformat-security -Wunused-parameter")
|
||||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libcpuid.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libcpuid.pc" ESCAPE_QUOTES
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libcpuid.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libcpuid.pc" ESCAPE_QUOTES
|
||||||
@ONLY)
|
@ONLY)
|
||||||
install(FILES "${PROJECT_BINARY_DIR}/libcpuid.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
install(FILES "${PROJECT_BINARY_DIR}/libcpuid.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||||
|
|
|
@ -246,10 +246,10 @@ void debug_print_lbits(int debuglevel, uint64_t mask)
|
||||||
int i, first = 0;
|
int i, first = 0;
|
||||||
for (i = 0; i < 64; i++) if (mask & (((uint64_t) 1) << i)) {
|
for (i = 0; i < 64; i++) if (mask & (((uint64_t) 1) << i)) {
|
||||||
if (first) first = 0;
|
if (first) first = 0;
|
||||||
else debugf(2, " + ");
|
else debugf(debuglevel, " + ");
|
||||||
debugf(2, "LBIT(%d)", i);
|
debugf(debuglevel, "LBIT(%d)", i);
|
||||||
}
|
}
|
||||||
debugf(2, "\n");
|
debugf(debuglevel, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Functions to manage cpu_affinity_mask_t type
|
/* Functions to manage cpu_affinity_mask_t type
|
||||||
|
|
|
@ -596,7 +596,7 @@ static struct amd_code_and_bits_t decode_amd_codename_part1(const char *bs)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void decode_amd_codename(struct cpu_raw_data_t* raw, struct cpu_id_t* data, struct internal_id_info_t* internal)
|
static void decode_amd_codename(struct cpu_id_t* data, struct internal_id_info_t* internal)
|
||||||
{
|
{
|
||||||
struct amd_code_and_bits_t code_and_bits = decode_amd_codename_part1(data->brand_str);
|
struct amd_code_and_bits_t code_and_bits = decode_amd_codename_part1(data->brand_str);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
@ -637,7 +637,7 @@ int cpuid_identify_amd(struct cpu_raw_data_t* raw, struct cpu_id_t* data, struct
|
||||||
else
|
else
|
||||||
decode_amd_cache_info(raw, data);
|
decode_amd_cache_info(raw, data);
|
||||||
decode_amd_number_of_cores(raw, data);
|
decode_amd_number_of_cores(raw, data);
|
||||||
decode_amd_codename(raw, data, internal);
|
decode_amd_codename(data, internal);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -622,9 +622,7 @@ static void decode_intel_oldstyle_cache_info(struct cpu_raw_data_t* raw, struct
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int decode_intel_extended_topology(struct cpu_raw_data_t* raw,
|
static int decode_intel_extended_topology(struct cpu_raw_data_t* raw, struct cpu_id_t* data)
|
||||||
struct cpu_id_t* data,
|
|
||||||
struct internal_id_info_t* internal)
|
|
||||||
{
|
{
|
||||||
int i, level_type, num_smt = -1, num_core = -1;
|
int i, level_type, num_smt = -1, num_core = -1;
|
||||||
|
|
||||||
|
@ -651,14 +649,12 @@ static int decode_intel_extended_topology(struct cpu_raw_data_t* raw,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void decode_intel_number_of_cores(struct cpu_raw_data_t* raw,
|
static void decode_intel_number_of_cores(struct cpu_raw_data_t* raw, struct cpu_id_t* data)
|
||||||
struct cpu_id_t* data,
|
|
||||||
struct internal_id_info_t* internal)
|
|
||||||
{
|
{
|
||||||
int logical_cpus = -1, num_cores = -1;
|
int logical_cpus = -1, num_cores = -1;
|
||||||
|
|
||||||
if (raw->basic_cpuid[0][EAX] >= 11) {
|
if (raw->basic_cpuid[0][EAX] >= 11) {
|
||||||
if (decode_intel_extended_topology(raw, data, internal)) return;
|
if (decode_intel_extended_topology(raw, data)) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (raw->basic_cpuid[0][EAX] >= 1) {
|
if (raw->basic_cpuid[0][EAX] >= 1) {
|
||||||
|
@ -941,7 +937,7 @@ int cpuid_identify_intel(struct cpu_raw_data_t* raw, struct cpu_id_t* data, stru
|
||||||
} else if (raw->basic_cpuid[0][EAX] >= 2) {
|
} else if (raw->basic_cpuid[0][EAX] >= 2) {
|
||||||
decode_intel_oldstyle_cache_info(raw, data);
|
decode_intel_oldstyle_cache_info(raw, data);
|
||||||
}
|
}
|
||||||
decode_intel_number_of_cores(raw, data, internal);
|
decode_intel_number_of_cores(raw, data);
|
||||||
data->purpose = cpuid_identify_purpose_intel(raw);
|
data->purpose = cpuid_identify_purpose_intel(raw);
|
||||||
|
|
||||||
brand = get_brand_code_and_bits(data);
|
brand = get_brand_code_and_bits(data);
|
||||||
|
|
Loading…
Reference in a new issue