Announcement

Collapse
No announcement yet.

Mesa Can Finally Build With Almost No Compiler Warnings

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by zman0900 View Post

    I bet a big part of that is code that originally produced no warnings, but newer compilers are better at finding problems / have more warnings.
    FWIW, many warnings are quite obvious. The code is just crap. C/C++ that don't trigger warnings is pretty good code these days, but still an expert coder could have avoided all the issues.

    Comment


    • #12
      Way to complain about open source code and not contribute fixes.

      Comment


      • #13
        Originally posted by fuzz View Post
        Way to complain about open source code and not contribute fixes.
        It's not very motivating to fix mysterious issues caused by careless mediocre coders when they can have all the fun focusing on shiny new features. It's like wiping the floor clean after a hyper active teenager arranges a party, drinks all the available booze, gets laid in your bed, and shits on the carpet.

        Comment


        • #14
          Hope to see Mesa get support for OpenGL 4.6 soon!

          Comment


          • #15
            Originally posted by varikonniemi View Post
            Yes, i am amazed at the nonchalant attitude towards warnings. A stable release should not happen with one. Either change the code, or the compiler.
            To quote one of the changes:
            That warning fires every time a string function takes an argument that could possibly be longer than its max output, which triggers all over the place, especially when working with file paths ("what if every file path is MAX_PATH long?" is what GCC is saying, which is really annoying when we *know* that "/dev/dri/cardN" is not gonna be 4096 char long and it's safe to store it in a 32-char array).
            Soooo the code is correct so there's nothing to change. But how would you change the compiler so that it knows that a specific path can't be longer than 4096? Let me know if you find out

            Comment


            • #16
              Originally posted by phoronix View Post
              Phoronix: Mesa Can Finally Build With Almost No Compiler Warnings

              Quite a feat for modern open-source projects with large C/C++ code-bases developed over the years, Mesa3D can almost be compiled now without any warnings -- there's just one remaining...

              http://www.phoronix.com/scan.php?pag...piler-Warnings

              So Mesa is focusing on "Microsoft Code Quality" goals -> "If it compiles, SHIP IT!!"

              Comment


              • #17
                Originally posted by NotMine999 View Post
                So Mesa is focusing on "Microsoft Code Quality" goals -> "If it compiles, SHIP IT!!"
                Did you even check what and how many warnings were fixed? It's not like there were hundreds of warnings.... And most of the fixes were "make the compiler happy, he doesn't understand, that this is correct". See my example on post above your post.

                Comment


                • #18
                  my eyes are bleeding from patch and code it patches. this is not c++. and it is not c++ by definition: it is full of ubs (*). c++ compiler can do anything to code with ub precisely because it only promised to compile c++ code and programmer failed his contract by supplying program in some other(imaginary) language.
                  btw, it does not fix warning, it just silences it

                  *) start here https://en.cppreference.com/w/cpp/string/byte/memcpy
                  Last edited by pal666; 21 September 2018, 10:02 PM.

                  Comment


                  • #19
                    Originally posted by droste View Post

                    To quote one of the changes:
                    Soooo the code is correct so there's nothing to change. But how would you change the compiler so that it knows that a specific path can't be longer than 4096? Let me know if you find out
                    pass size, so compiler could ensure that code is correct.

                    Comment


                    • #20
                      Originally posted by zman0900 View Post

                      I bet a big part of that is code that originally produced no warnings, but newer compilers are better at finding problems / have more warnings.
                      Correct!
                      Specially since version 7 gcc is a lot more Verbose..
                      If you code with gcc 6 and I compile with seven or 8 a lot of warnings will apear, since there is not a rule that fit all, the code reflect some compromises..

                      But the warnings, are just warnings..the problem is compiler take decisions by himself, and that sometimes lead to big problems..at least since version 4.7 if I can remember.
                      The Linux kernel has its share of suffering, with gcc, trying to play tricks
                      I remember some Bug episodes, the most problematic took almost a year to solve...but at the end...
                      hoo the compiler changed the generated assembler, from what was supposed to be...to its own version...LOL

                      Comment

                      Working...
                      X