-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix: make sure that postject-api.h
compiles without warnings
#54
Merged
RaisinTen
merged 9 commits into
main
from
fix/make-sure-that-postject-api.h-compiles-without-warnings
Oct 20, 2022
Merged
fix: make sure that postject-api.h
compiles without warnings
#54
RaisinTen
merged 9 commits into
main
from
fix/make-sure-that-postject-api.h-compiles-without-warnings
Oct 20, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes the following error I came across while integrating Postject in Node.js: ```console ../deps/postject/src/dist/postject-api.h:30:13: error: unused function 'postject_options_init' [-Werror,-Wunused-function] static void postject_options_init(struct postject_options* options) { ^ 1 error generated. ``` Refs: nodejs/node#45038 Signed-off-by: Darshan Sen <[email protected]>
RaisinTen
requested review from
dsanders11,
jviotti and
robertgzr
as code owners
October 19, 2022 07:52
RaisinTen
changed the title
fix: make sure that postject-api.h compiles without warnings
fix: make sure that Oct 19, 2022
postject-api.h
compiles without warnings
```console In file included from /root/project/test/test.c:4: /root/project/test/../dist/postject-api.h: In function 'postject_find_resource': /root/project/test/../dist/postject-api.h:96:9: error: unused variable 'ptr' [-Werror=unused-variable] 96 | void* ptr = NULL; | ^~~ cc1: all warnings being treated as errors ``` Refs: https://app.circleci.com/pipelines/github/postmanlabs/postject/180/workflows/d0eb47c0-5482-4c85-9c63-aa854ddb0221/jobs/1398?invite=true#step-110-678 Signed-off-by: Darshan Sen <[email protected]>
RaisinTen
force-pushed
the
fix/make-sure-that-postject-api.h-compiles-without-warnings
branch
from
October 19, 2022 08:54
433583e
to
687cc56
Compare
Signed-off-by: Darshan Sen <[email protected]>
RaisinTen
force-pushed
the
fix/make-sure-that-postject-api.h-compiles-without-warnings
branch
from
October 19, 2022 12:06
ddc57b6
to
fdb73d4
Compare
-Wall produces too many warnings. Refs: https://app.circleci.com/pipelines/github/postmanlabs/postject/185/workflows/48b0f126-8000-41d9-b39e-cb8b9e4bc9d6/jobs/1441?invite=true#step-107-693 Signed-off-by: Darshan Sen <[email protected]>
```console C:\Users\circleci\project\test\../dist/postject-api.h(153,5): error C2220: the following warning is treated as an error [C:\Users\circleci\project\build\test\c_test.vcxproj] C:\Users\circleci\project\test\../dist/postject-api.h(153,5): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\circleci\project\build\test\c_test.vcxproj] C:\Users\circleci\project\test\test.c(13,5): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\circleci\project\build\test\c_test.vcxproj] ``` Refs: https://app.circleci.com/pipelines/github/postmanlabs/postject/186/workflows/f1389b9f-c958-4a24-9d6e-28af856ff776/jobs/1455?invite=true#step-107-694 Signed-off-by: Darshan Sen <[email protected]>
```console C:\Users\circleci\project\test\test.c(13,5): error C2220: the following warning is treated as an error [C:\Users\circleci\project\build\test\c_test.vcxproj] C:\Users\circleci\project\test\test.c(13,5): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\circleci\project\build\test\c_test.vcxproj] ``` Refs: https://app.circleci.com/pipelines/github/postmanlabs/postject/187/workflows/8bcdcb96-646d-4008-93bf-294e92469b3d/jobs/1464?invite=true#step-107-694 Signed-off-by: Darshan Sen <[email protected]>
```console C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\ostream(743,1): error C2220: the following warning is treated as an error [C:\Users\circleci\project\build\test\cpp_test.vcxproj] C:\Users\circleci\project\test\test.cpp(13): message : see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &std::operator <<<std::char_traits<char>>(std::basic_ostream<char,std::char_traits<char>> &,const char *)' being compiled [C:\Users\circleci\project\build\test\cpp_test.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\ostream(743,1): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc [C:\Users\circleci\project\build\test\cpp_test.vcxproj] ``` Refs: https://app.circleci.com/pipelines/github/postmanlabs/postject/188/workflows/9107adc5-61a3-41ad-bd60-dd3eb0996765/jobs/1470?invite=true#step-107-696 Signed-off-by: Darshan Sen <[email protected]>
Signed-off-by: Darshan Sen <[email protected]>
jviotti
reviewed
Oct 19, 2022
jviotti
approved these changes
Oct 19, 2022
Signed-off-by: Darshan Sen <[email protected]>
RaisinTen
deleted the
fix/make-sure-that-postject-api.h-compiles-without-warnings
branch
October 20, 2022 13:16
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes the following error I came across while integrating Postject in Node.js:
Refs: nodejs/node#45038
Signed-off-by: Darshan Sen [email protected]