Git Product home page Git Product logo

Comments (2)

bnoordhuis avatar bnoordhuis commented on June 15, 2024

if you were interested in getting these silenced yourself

On a case-by-case basis yes, in general no.

The "potentially uninitialized local variable" warnings are probably false positives but it'd be good to check them anyway.

A lot of the other warnings however are bogus and I plan to encumber the code with things like pointless casts in order to pacify a compiler. To pick two examples from src/idna.c:

C:\Users\gocdu\programs\libuv\src\idna.c(80): warning C4245: 'return': conversion from 'int' to 'unsigned int', signed/unsigned mismatch

That's the perfectly legal and well-defined idiom of return -1 in a function that returns unsigned int.

Now, you could change that to return ~0u but that's definitely less robust. It quietly starts doing the wrong thing when the return type is changed to e.g. unsigned long (because then it needs to be return ~0ul)

C:\Users\gocdu\programs\libuv\src\idna.c(500): warning C4244: '=': conversion from 'int32_t' to 'char', possible loss of data

Libuv literally checks on the previous line that the value is in range but the compiler isn't smart enough to realize that.

from libuv.

dundargoc avatar dundargoc commented on June 15, 2024

Yes, I understand. Thank you for your time.

from libuv.

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.