Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-1919

incompatible pointer to integer conversion

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.5.0
    • 1.5.0
    • None
    • None

    Description

      The OPT_BSON_ERR() macro returns NULL on failure, but the macro is also used in functions that expect to return booleans.

       
      [2016/11/14 17:16:21.703] src/mongoc/mongoc-cursor.c:901:7: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'bool' (aka 'signed char') [-Werror,-Wint-conversion]
      [2016/11/14 17:16:21.703]       OPT_BSON_ERR ("Invalid 'opts' parameter.");
      [2016/11/14 17:16:21.703]       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      [2016/11/14 17:16:21.703] src/mongoc/mongoc-cursor.c:860:14: note: expanded from macro 'OPT_BSON_ERR'
      [2016/11/14 17:16:21.703]       return NULL; \
      [2016/11/14 17:16:21.703]              ^~~~
       
      
      

      Attachments

        Activity

          People

            jesse@mongodb.com A. Jesse Jiryu Davis
            bjori Hannes Magnusson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: