Skip to content

Commit

Permalink
Merge pull request #6758 from XrXr/ub
Browse files Browse the repository at this point in the history
Remove unused argument to avoid UB
  • Loading branch information
haberman committed Oct 16, 2019
2 parents 9fdb2cf + c1ba7c6 commit 77646a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ruby/ext/google/protobuf_c/defs.c
Expand Up @@ -1232,7 +1232,7 @@ VALUE OneofDescriptor_name(VALUE _self) {
*
* Iterates through fields in this oneof, yielding to the block on each one.
*/
VALUE OneofDescriptor_each(VALUE _self, VALUE field) {
VALUE OneofDescriptor_each(VALUE _self) {
DEFINE_SELF(OneofDescriptor, self, _self);
upb_oneof_iter it;
for (upb_oneof_begin(&it, self->oneofdef);
Expand Down
2 changes: 1 addition & 1 deletion ruby/ext/google/protobuf_c/protobuf.h
Expand Up @@ -259,7 +259,7 @@ OneofDescriptor* ruby_to_OneofDescriptor(VALUE value);
VALUE OneofDescriptor_initialize(VALUE _self, VALUE cookie,
VALUE descriptor_pool, VALUE ptr);
VALUE OneofDescriptor_name(VALUE _self);
VALUE OneofDescriptor_each(VALUE _self, VALUE field);
VALUE OneofDescriptor_each(VALUE _self);

void EnumDescriptor_mark(void* _self);
void EnumDescriptor_free(void* _self);
Expand Down

0 comments on commit 77646a4

Please sign in to comment.