[CDRIVER-2091] Compiler warnings in clang on OS X Created: 17/Mar/17  Updated: 03/May/17  Resolved: 26/Mar/17

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

Type: Improvement Priority: Minor - P4
Reporter: Paul Melnikow Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS X, iOS, watchOS, tvOS



 Description   

/Users/pnm/code/libbson/src/bson/bson-decimal128.c:102:11: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
/Users/pnm/code/libbson/src/bson/bson-decimal128.c:681:19: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
/Users/pnm/code/libbson/src/bson/bson-decimal128.c:690:19: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
/Users/pnm/code/libbson/src/bson/bson-timegm.c:569:15: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int_fast32_t' (aka 'int') [-Wshorten-64-to-32]
/Users/pnm/code/libbson/src/bson/bson.c:2147:4: warning: ambiguous expansion of macro 'va_copy' [-Wambiguous-macro]
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include/stdarg.h:43:9: note: expanding this definition of 'va_copy'
/Users/pnm/code/libbson/src/bson/bson-compat.h:158:9: note: other definition of 'va_copy'



 Comments   
Comment by A. Jesse Jiryu Davis [ 26/Mar/17 ]

https://github.com/mongodb/libbson/commit/895bf017feb8fadfd6986e602b32f3699b860a7b

Comment by Paul Melnikow [ 17/Mar/17 ]

Here's the fix: https://github.com/mongodb/libbson/pull/184

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