Skip to content

fix: rename parameter to avoid -Wshadow warning in message_t constructor#683

Open
ctonneslan wants to merge 1 commit intozeromq:masterfrom
ctonneslan:fix/shadow-warning-data-parameter
Open

fix: rename parameter to avoid -Wshadow warning in message_t constructor#683
ctonneslan wants to merge 1 commit intozeromq:masterfrom
ctonneslan:fix/shadow-warning-data-parameter

Conversation

@ctonneslan
Copy link

Summary

Renames the data parameter in the deprecated array constructor of message_t to arr to avoid GCC's -Wshadow warning:

warning: declaration of 'data' shadows a member of 'zmq::message_t' [-Wshadow]

The parameter data shadows the message_t::data() method. Renaming to arr resolves the warning without changing behavior (the constructor is already deprecated).

Fixes #641

The 'data' parameter in the deprecated array constructor shadows
message_t::data(), triggering -Wshadow warnings on GCC. Rename
to 'arr' to resolve.

Fixes zeromq#641
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.

Parameter name "data" in message_t constructor reuses the method name (warning when compiling user code)

1 participant