Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-710

Fix unused variable compilation warnings in bson_ext

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.10.0
    • Affects Version/s: None
    • Component/s: BSON
    • None

      Currently, in 1.x-stable while running Ruby 2.0.0 we have the following warnings when you compile the BSON C-extensions for the Ruby driver:

      rake compile
      
      mkdir -p lib/bson_ext
      mkdir -p tmp/x86_64-darwin13.0.0/cbson/2.0.0
      cd tmp/x86_64-darwin13.0.0/cbson/2.0.0
      /Users/brandonblack/.rvm/rubies/ruby-2.0.0-p353/bin/ruby -I. ../../../../ext/cbson/extconf.rb
      checking for asprintf()... yes
      checking for ruby/st.h... yes
      checking for ruby/regex.h... yes
      checking for ruby/encoding.h... yes
      creating Makefile
      cd -
      cd tmp/x86_64-darwin13.0.0/cbson/2.0.0
      make
      compiling ../../../../ext/cbson/bson_buffer.c
      compiling ../../../../ext/cbson/cbson.c
      ../../../../ext/cbson/cbson.c:849:31: warning: unused variable 'flags' [-Wunused-variable]
                  int flags_length, flags = 0, i = 0;
                                    ^
      ../../../../ext/cbson/cbson.c:849:42: warning: unused variable 'i' [-Wunused-variable]
                  int flags_length, flags = 0, i = 0;
                                               ^
      2 warnings generated.
      compiling ../../../../ext/cbson/encoding_helpers.c
      linking shared-object bson_ext/cbson.bundle
      cd -
      mkdir -p tmp/x86_64-darwin13.0.0/stage/lib/bson_ext
      install -c tmp/x86_64-darwin13.0.0/cbson/2.0.0/cbson.bundle lib/bson_ext/cbson.bundle
      cp tmp/x86_64-darwin13.0.0/cbson/2.0.0/cbson.bundle tmp/x86_64-darwin13.0.0/stage/lib/bson_ext/cbson.bundle
      

      We need to try and clean this up before release.

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            brandon.black@10gen.com Brandon Black
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: