Git Product home page Git Product logo

Comments (2)

vfelsner avatar vfelsner commented on June 19, 2024

Same here, at least for the first warning.
And looking at it, length is uint32_t. It doesn't make sense to compare that to -1.

I suggest changing that to int32_t?

from libjson.

vfelsner avatar vfelsner commented on June 19, 2024

Any news on this? I'd change the code myself but don't have a deep enough understanding of the library.

Here's my warnings output:

Description Resource Path Location Type
conversion to 'int' from 'uint32_t {aka long unsigned int}' may change the sign of the result [-Wsign-conversion] json.c /Master_TestHW/src/c/libjson line 468 C/C++ Problem

conversion to 'int' from 'uint32_t {aka long unsigned int}' may change the sign of the result [-Wsign-conversion] json.c /Master_TestHW/src/c/libjson line 1034 C/C++ Problem

conversion to 'int32_t {aka long int}' from 'size_t {aka unsigned int}' may change the sign of the result [-Wsign-conversion] json.c /Master_TestHW/src/c/libjson line 966 C/C++ Problem

conversion to 'long unsigned int' from 'int' may change the sign of the result [-Wsign-conversion] json.c /Master_TestHW/src/c/libjson line 485 C/C++ Problem

conversion to 'uint16_t {aka short unsigned int}' from 'uint32_t {aka long unsigned int}' may alter its value [-Wconversion] json.c /Master_TestHW/src/c/libjson line 497 C/C++ Problem

conversion to 'uint32_t {aka long unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion] json.c /Master_TestHW/src/c/libjson line 470 C/C++ Problem

conversion to 'uint32_t {aka long unsigned int}' from 'int32_t {aka long int}' may change the sign of the result [-Wsign-conversion] json.c /Master_TestHW/src/c/libjson line 967 C/C++ Problem

conversion to 'uint8_t {aka unsigned char}' from 'int' may alter its value [-Wconversion] json.c /Master_TestHW/src/c/libjson line 364 C/C++ Problem

conversion to 'uint8_t {aka unsigned char}' from 'int' may alter its value [-Wconversion] json.c /Master_TestHW/src/c/libjson line 785 C/C++ Problem

from libjson.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.