Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-9680

Invalid use of negative enumeration on type not declared as signed

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.1
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Linux
    • Hide

      Attempt to build on armhf.

      Show
      Attempt to build on armhf.

      MinKey is defined as -1, so a signed char must be used to store BSONType
      enumerations. Using a char to store a negative value results in
      undefined behaviour. On i386 and amd64 architectures it happens to work
      because on these platforms a char is generally signed, but this is not
      guaranteed.

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            rwbb Robie Basak
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: