Skip to content
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 some types of warnings #355

Merged
merged 1 commit into from
May 2, 2022
Merged

Conversation

TedLyngmo
Copy link
Contributor

Also added a few warning options to the build:
-Wshadow -Wconversion -Wcast-qual

-Wsign-conversion can also be added if the below pull request is approved:
redis/hiredis#1064

Signed-off-by: Ted Lyngmo [email protected]

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
src/sw/redis++/connection.cpp Outdated Show resolved Hide resolved
src/sw/redis++/connection.cpp Outdated Show resolved Hide resolved
src/sw/redis++/queued_redis.hpp Outdated Show resolved Hide resolved
src/sw/redis++/reply.h Outdated Show resolved Hide resolved
src/sw/redis++/queued_redis.hpp Outdated Show resolved Hide resolved
Also added a few warning options to the build:
-Wshadow -Wconversion -Wcast-qual

-Wsign-conversion can also be added if the below pull request is approved:
redis/hiredis#1064

Signed-off-by: Ted Lyngmo <[email protected]>
Copy link
Owner

@sewenew sewenew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TedLyngmo Thanks for contribution!

However, when I tried to compile the code, the async interface related code cannot pass compilation. Because hiredis cannot compile with -Wconversion. See this for detail.

I'll merge your PR, and also modify some async interface related code to make it compile with -Wshadow, -Wcast-qual and -Wconversion. However, I have to remove these compiler options unless hiredis adds these options in its Makefile. Because I've no idea whether hiredis might add some code in the future, violating these options, and make redis-plus-plus fail to compile. Hope you understand. And you can try to create a PR for hiredis to add these options in its Makefile.

Regards

@sewenew sewenew merged commit 1054446 into sewenew:master May 2, 2022
@TedLyngmo TedLyngmo deleted the fix_some_warnings branch May 4, 2022 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants