-
Notifications
You must be signed in to change notification settings - Fork 3.8k
GH-47099: [C++][Parquet] parquet/platform.h is missing pragma warning(pop) #47114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Could you try to add following code to fix https://ci.appveyor.com/project/ApacheSoftwareFoundation/arrow/builds/52408405
|
I did that but it did not help much AFAICS. How do we continue? Should I add another warning push/pop to exception.h? |
From the above log, |
Yes, that is also my understanding on how the push / pop mechanism works. The warnings are only disabled for everything between the push and the pop. So we either need to
I would prefer option 2 but I have only very limited knowledge about the code base. |
But if you don't add the pop, the warning is disabled for every file which does |
As you can see, adding |
Can we use this approach something like the following? diff --git a/cpp/src/parquet/CMakeLists.txt b/cpp/src/parquet/CMakeLists.txt
index dc7d40d2a3..717496496a 100644
--- a/cpp/src/parquet/CMakeLists.txt
+++ b/cpp/src/parquet/CMakeLists.txt
@@ -352,6 +352,18 @@ foreach(LIB_TARGET ${PARQUET_LIBRARIES})
endif()
endforeach()
+# Disable warnings
+foreach(LIB_TARGET ${PARQUET_LIBRARIES})
+ if(MSVC)
+ # Disable warning for STL types usage in DLL interface
+ # https://web.archive.org/web/20130317015847/http://connect.microsoft.com/VisualStudio/feedback/details/696593/vc-10-vs-2010-basic-string-exports
+ target_compile_options(${LIB_TARGET} PUBLIC "/wd4275" "/wd4251")
+ # Disable diamond inheritance warnings
+ target_compile_options(${LIB_TARGET} PRIVATE "/wd4250")
+ ...
+ endif()
+endforeach()
+
if(WIN32 AND ARROW_BUILD_STATIC)
target_compile_definitions(parquet_static PUBLIC PARQUET_STATIC)
endif() We can use |
I don't think so. We just need to add another pair of push/pop to exception.h. I can give this a try if you wish |
Sure, feel free to try it out. Thanks! |
Rationale for this change
The missing pragma is causing warnings downstream see #47099
What changes are included in this PR?
Adding the missing pragma warning(pop)
Are these changes tested?
I hope for the CI to do that ;-)
Are there any user-facing changes?
The developer should see less warnings otherwise, no.