Compiler warnings in test-bson.c

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.6.1
    • Affects Version/s: 1.6.0
    • Component/s: libbson
    • None
    • Environment:
      GCC 7 on GNU/Linux
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When building libbson-1.6.0, I can see compiler warnings like this :

          tests/test-bson.c:1709:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
              ASSERT (buf = bson_reserve_buffer (&stack_alloced, src.len));
      

      and yet another one about unused variable. Attached patch fixes it.

              Assignee:
              A. Jesse Jiryu Davis
              Reporter:
              Petr Pisar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: