Giter Site home page Giter Site logo

Comments (7)

RobTillaart avatar RobTillaart commented on May 29, 2024

Good afternoon Pablo,

Thanks for the issue, I will try to fix it this weekend (busy on another bug now)

Which platform do you use?

from dhtnew.

pabloandresm avatar pabloandresm commented on May 29, 2024

I use ESP32 with the Arduino IDE.

I always try to use -Wall -Werror and even --pedantic :), as the warnings that are reported are sometimes important. I advise my friends to compile with all of that too :)

Thank you Rob

from dhtnew.

RobTillaart avatar RobTillaart commented on May 29, 2024

@pabloandresm
Created a develop branch, no sensor here nearby to do a quick test.

Can you give the develop branch a try?

from dhtnew.

pabloandresm avatar pabloandresm commented on May 29, 2024

Well there is not much test to do. The 'if (_tempOffset != (float)0.0)' will not impact anything, it will just avoid the warning message during compilation. Without the '(float)' the 0.0 will be taken as double and hence issue the warning.

Strangely as it may seem, the warning does not appear when, for example, assigning _tempOffset a 0.0, but just at comparison in those 2 lines I mentioned before, 243 and 249.

from dhtnew.

RobTillaart avatar RobTillaart commented on May 29, 2024

mmm, that is how compilers work, they look different at comparisons and assignments. With an assignment of a constant to a variable of a smaller type the compiler can deduce it will fit. When comparing with a variable it cannot know if there is a range problem.
I did cast all assignments too, to remove all ambiguity with 0.0 from the code.

I will merge in a few minutes.

from dhtnew.

RobTillaart avatar RobTillaart commented on May 29, 2024

Merged the fix, so if there are other issues, let me know.

from dhtnew.

pabloandresm avatar pabloandresm commented on May 29, 2024

That was quick! Thank you very much.

from dhtnew.

Related Issues (20)

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.