Menu

#7 Warnings in Visual Studio 2010 build

closed-fixed
nobody
None
5
2011-02-24
2011-02-23
No

Building in Visual C++ with the unicode and binary options set, get:
JSONWorker.cpp (482): '>>' : right shift by too large amount, data loss
JSon_Base64 (88, 91): conversion from 'wchar_t' to 'const char', possible loss of data
JSONNode.cpp (214): wcstombs may be unsafe, consider using wcstombs_s instead

Discussion

  • Jonathan Wallace

    JSONWorker.cpp(482) - it's not possible to loose precision because of the other masks and shifts, ignore this
    JSON_Base64.cpp(88, 91) - fixed
    internalJSONNode.cpp(214) - if _MSC_VER and JSON_SAFE is defined, it will now use wcstombs_s, otherwise it will still use wcstombs. However I added some extra safety catches there as well.

    These upgrades will be available on the next release

     
  • Jonathan Wallace

    • status: open --> closed-fixed