Skip to content

Commit

Permalink
Suppress warnings in third_party subprojects. (llvm#917)
Browse files Browse the repository at this point in the history
Signed-off-by: Ettore Tiotto <etiotto@ca.ibm.com>
  • Loading branch information
Ettore Tiotto committed Oct 19, 2021
1 parent d6f3ab4 commit 3d7afed
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,8 @@ elseif ((ONNX_USE_PROTOBUF_SHARED_LIBS AND Protobuf_USE_STATIC_LIBS)
message(FATAL_ERROR
"ONNX_USE_PROTOBUF_SHARED_LIBS and Protobuf_USE_STATIC_LIBS must be opposites of each other.")
endif()
add_subdirectory(third_party/onnx)

add_subdirectory(third_party/pybind11)
add_subdirectory(third_party/rapidcheck)

add_subdirectory(third_party)
add_subdirectory(utils)
add_subdirectory(include)
add_subdirectory(src)
Expand Down
4 changes: 2 additions & 2 deletions src/Runtime/jni/jnilog.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void log_printf(
sprintf(buf, "[-]");

/* Output thread ID, log level, file name, function number, and line number */
snprintf(buf + strlen(buf), LOG_MAX_LEN - strlen(buf), "[%lx][%s]%s:%s:%d ",
snprintf(buf + strlen(buf), LOG_MAX_LEN - strlen(buf), "[%p][%s]%s:%s:%d ",
get_threadid(), log_level_name[level], get_filename(file), func, line);

/* Output actual log data */
Expand Down Expand Up @@ -204,7 +204,7 @@ static FILE *get_log_file_by_name(char *name) {
else {
char *tname = (char *)malloc(strlen(name) + 32);
if (tname) {
snprintf(tname, strlen(name) + 32, "%s.%lx", name, get_threadid());
snprintf(tname, strlen(name) + 32, "%s.%p", name, get_threadid());
fp = fopen(tname, "w");
free(tname);
}
Expand Down
5 changes: 4 additions & 1 deletion test/onnx2mlir/CustomFnTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@
#include "mlir/Pass/PassManager.h"
#include "mlir/Transforms/Passes.h"

#pragma clang diagnostic ignored "-Weverything"
#pragma gcc diagnostic ignored "-Weverything"
#include "onnx/defs/function.h"
#include "onnx/defs/schema.h"
#pragma clang diagnostic pop
#pragma gcc diagnostic pop

#include "src/Builder/FrontendDialectTransformer.hpp"

#include "src/Interface/ShapeInferenceOpInterface.hpp"
#include "src/Pass/Passes.hpp"

Expand Down
8 changes: 8 additions & 0 deletions third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
# Suppress warnings in third party subprojects.
add_compile_options(-Wno-everything)
endif()

add_subdirectory(onnx)
add_subdirectory(pybind11)
add_subdirectory(rapidcheck)

0 comments on commit 3d7afed

Please sign in to comment.