1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2025-02-22 20:25:04 +00:00

Do not warn about deprecated declarations in cpu_ident_internal()

This commit is contained in:
The Tumultuous Unicorn Of Darkness 2024-06-30 13:51:50 +02:00
parent 549206f59e
commit 7456289072
No known key found for this signature in database
GPG key ID: 1E55EE2EFF18BC1A
2 changed files with 6 additions and 1 deletions

View file

@ -55,7 +55,7 @@ if(UNIX)
set(exec_prefix "\${prefix}")
set(libdir "\${exec_prefix}/lib")
set(includedir "\${prefix}/include")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wuninitialized -Wstrict-prototypes -Wformat -Wformat-security -Wunused-parameter -Wno-deprecated-declarations")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wuninitialized -Wstrict-prototypes -Wformat -Wformat-security -Wunused-parameter -Wdeprecated-declarations")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libcpuid.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libcpuid.pc" ESCAPE_QUOTES
@ONLY)
install(FILES "${PROJECT_BINARY_DIR}/libcpuid.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")

View file

@ -1381,6 +1381,11 @@ int cpu_ident_internal(struct cpu_raw_data_t* raw, struct cpu_id_t* data, struct
}
#ifndef LIBCPUID_DISABLE_DEPRECATED
# if defined(__GNUC__) || defined(GNUC)
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
# elif defined(__clang__)
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
# endif
/* Backward compatibility */
/* - Deprecated since v0.5.0 */
data->l1_assoc = data->l1_data_assoc;