avoid "local ... hides instance variable" warnings in generated code #20

Merged
merged 1 commit into from Jan 18, 2012

Conversation

Projects
None yet
2 participants
Contributor

dicej commented Jan 18, 2012

GCC gets upset if you hide an instance variable with a local variable
and issues a warning that apparently can't be turned off. This commit
renames the "size" local variable in the serializedSize generated
method so it doesn't hide the instance variable. It also renames the
"value" parameter to the setHasFoo: methods to avoid hiding a field
named "value" if it happens to exist.

@dicej dicej avoid "local ... hides instance variable" warnings in generated code
GCC gets upset if you hide an instance variable with a local variable
and issues a warning that apparently can't be turned off.  This commit
renames the "size" local variable in the serializedSize generated
method so it doesn't hide the instance variable.  It also renames the
"value" parameter to the setHasFoo: methods to avoid hiding a field
named "value" if it happens to exist.
2a22a14

@jparise jparise added a commit that referenced this pull request Jan 18, 2012

@jparise jparise Merge pull request #20 from dicej/master
avoid "local ... hides instance variable" warnings in generated code
9eb586b

@jparise jparise merged commit 9eb586b into booyah:master Jan 18, 2012

@Packetdancer Packetdancer pushed a commit to Packetdancer/protobuf-objc that referenced this pull request Feb 4, 2015

@alexeyxo alexeyxo Merge pull request #20 from jroersma/memory-leak-fix
Fixed leak of dynamically-allocated data.
a1c5f1f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment