[CDRIVER-1997] suspicous code in jsonl Created: 20/Jan/17  Updated: 11/Sep/19  Resolved: 30/Jan/17

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.6.0

Type: Task Priority: Major - P3
Reporter: Hannes Magnusson Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

src/jsonsl/jsonsl.h:   unsigned int max_callback_level;
src/jsonsl/jsonsl.c:   jsn->max_callback_level = -1;

that looks a bit suspicious and causes compiler warning

"src/jsonsl/jsonsl.c", line 123: warning #2068-D: integer conversion resulted
          in a change of sign
     jsn->max_callback_level = -1;



 Comments   
Comment by A. Jesse Jiryu Davis [ 30/Jan/17 ]

Submitted a fix upstream

Comment by Githook User [ 30/Jan/17 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1997 warning in test
Branch: master
https://github.com/mongodb/libbson/commit/1a1d93d70f450fd3197d6556ebddc43179ec0951

Comment by Githook User [ 30/Jan/17 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1997 warning in jsonsl code
Branch: master
https://github.com/mongodb/libbson/commit/6e0f9c68d8654b77ca9f388762b6f1cbcee526a7

Comment by Hannes Magnusson [ 20/Jan/17 ]

two more in tests:

 
"tests/test-bson.c", line 985: warning #2068-D: integer conversion resulted in
          a change of sign
     data[7] = '\xff';
               ^
 
"tests/test-bson.c", line 1022: warning #2068-D: integer conversion resulted
          in a change of sign
     data[12] = '\xff';
                ^

Generated at Wed Feb 07 21:13:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.