Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Compiler Warnings...

Compiler Warnings...

Scheduled Pinned Locked Moved The Lounge
question
50 Posts 32 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

    How seriously do you handle them?

    "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

    R Offline
    R Offline
    Ravi Bhavnani
    wrote on last edited by
    #24

    Compiler warnings fail our build.  If we really need to ignore a specific warning, we disable it. /ravi

    My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

    1 Reply Last reply
    0
    • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

      How seriously do you handle them?

      "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

      T Offline
      T Offline
      TheGreatAndPowerfulOz
      wrote on last edited by
      #25

      set warnings as errors. :thumbsup::thumbsup:

      #SupportHeForShe Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

      1 Reply Last reply
      0
      • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

        How seriously do you handle them?

        "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

        D Offline
        D Offline
        DJ van Wyk
        wrote on last edited by
        #26

        Warnings have the tendency to hide errors. John Carmack wrote a pretty good article a few years ago about the best way to think of and treat warnings.

        My plan is to live forever ... so far so good

        1 Reply Last reply
        0
        • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

          How seriously do you handle them?

          "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

          M Offline
          M Offline
          Member 9167057
          wrote on last edited by
          #27

          While prototyping, who cares. When making the code production-ready, same as errors.

          1 Reply Last reply
          0
          • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

            How seriously do you handle them?

            "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

            M Offline
            M Offline
            markrlondon
            wrote on last edited by
            #28

            We ignore all warnings and catch bugs in user alpha testing. Of course.

            K 1 Reply Last reply
            0
            • C CodeWraith

              Compiler warnings? 0.0 max. Warnings from hysterical Code Nazi tools? Who cares?

              I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.

              D Offline
              D Offline
              den2k88
              wrote on last edited by
              #29

              Unless you're bound to MISRA or the equivalent Aerospace normative.

              GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

              1 Reply Last reply
              0
              • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                How seriously do you handle them?

                "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

                W Offline
                W Offline
                W Balboos GHB
                wrote on last edited by
                #30

                I don't take threats!

                Ravings en masse^

                "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                1 Reply Last reply
                0
                • D dandy72

                  If the compiler doesn't understand your code, what chance do your co-workers stand...? :-)

                  W Offline
                  W Offline
                  W Balboos GHB
                  wrote on last edited by
                  #31

                  Have you ever heard of "Job Security" ?

                  Ravings en masse^

                  "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                  "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                  D B 2 Replies Last reply
                  0
                  • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                    How seriously do you handle them?

                    "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

                    M Offline
                    M Offline
                    Marco Bertschi
                    wrote on last edited by
                    #32

                    We manage them. Warnings which disturb us (coding-style variances those warn us of, mostly) get disabled by the ruleset, merging anything is only possible with zero warnings. Too often have warnings led to bugs, and managing them to get only those which add value for our team has suited us well.

                    I only have a signature in order to let @DalekDave follow my posts.

                    1 Reply Last reply
                    0
                    • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                      How seriously do you handle them?

                      "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

                      O Offline
                      O Offline
                      obermd
                      wrote on last edited by
                      #33

                      I consider them Errors and fail the compile.

                      1 Reply Last reply
                      0
                      • M markrlondon

                        We ignore all warnings and catch bugs in user alpha testing. Of course.

                        K Offline
                        K Offline
                        kmoorevs
                        wrote on last edited by
                        #34

                        markrlondon wrote:

                        catch bugs in user alpha testing.

                        :thumbsup: Finally, a real-world answer! If it weren't for users, I'd have no bugs at all. :laugh:

                        "Go forth into the source" - Neal Morse

                        1 Reply Last reply
                        0
                        • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                          How seriously do you handle them?

                          "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

                          D Offline
                          D Offline
                          Dr Walt Fair PE
                          wrote on last edited by
                          #35

                          I prefer to call them suggestions. and if I wanted suggestions for my code, I'd just out-source it.

                          CQ de W5ALT

                          Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

                          1 Reply Last reply
                          0
                          • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                            How seriously do you handle them?

                            "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

                            G Offline
                            G Offline
                            Gary Wheeler
                            wrote on last edited by
                            #36

                            To the knife.

                            Software Zen: delete this;

                            1 Reply Last reply
                            0
                            • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                              How seriously do you handle them?

                              "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

                              I Offline
                              I Offline
                              I_made_a_womble
                              wrote on last edited by
                              #37

                              Compiler warnings should never be ignored. If you ignore them, they build up and eventually obscure things like: "Unable to resolve reference to x as it was built with a higher framework version". This is just a warning, but try and publish such an application and you will quickly find it does not work in production. The number of times I am asked to help someone solve an issue which they could have solved themselves if they just read the warnings...

                              1 Reply Last reply
                              0
                              • W W Balboos GHB

                                Have you ever heard of "Job Security" ?

                                Ravings en masse^

                                "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                                "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                                D Offline
                                D Offline
                                dandy72
                                wrote on last edited by
                                #38

                                Carry on, my friend! :-p

                                1 Reply Last reply
                                0
                                • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                                  How seriously do you handle them?

                                  "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

                                  L Offline
                                  L Offline
                                  Lost User
                                  wrote on last edited by
                                  #39

                                  The only warnings ones I (usually) have are "returns" used to "disable" code meant for (eventual) deletion. So, I guess I do take notice when it's something else. They eventually get cleaned up; mostly unreferenced variables. Probably an OCD thing. (Someone once noticed I had left an unused namespace in my XAML ... while I was developing; and felt they needed to bring it up).

                                  The Master said, 'Am I indeed possessed of knowledge? I am not knowing. But if a mean person, who appears quite empty-like, ask anything of me, I set it forth from one end to the other, and exhaust it.' ― Confucian Analects

                                  1 Reply Last reply
                                  0
                                  • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                                    How seriously do you handle them?

                                    "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

                                    K Offline
                                    K Offline
                                    kalberts
                                    wrote on last edited by
                                    #40

                                    We are in the process of introducing the Coverity static code analyzer. It is very good at telling you why it warns you ("If [this] occurs, and then [this] and then [this], then you follow a null reference at [that] line" - the series of inferences may jump from source file to source file, and may go in five or six or more steps). For this discussion it is more important that it maintains a history of all the "defects": If you have once reported that a given defect is in intentional, at the next Coverity run it will not be reported again. Same if you have flagged it as a false warning (which may occur if you set the agressiveness level to "high"). So you won't have the same warnings again and again. That makes it much more realistic to handle even moderate risk defects, because you do it once only. And if you give it a verdict of "intentional" or "false warning", you can leave it in your source code as it is. Actually I am a little bit in love with Coverity at the moment. I never seen any compiler or other code analyzer that comes close to it neither in its ability to detect defects, nor its flexibility in handling them. The big disadvantage is that your billfold will complain loudly ... And it takes some heavy iron (or lot of patience). But when you employer can afford both the software and the iron, then it is great.

                                    1 Reply Last reply
                                    0
                                    • W W Balboos GHB

                                      Have you ever heard of "Job Security" ?

                                      Ravings en masse^

                                      "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                                      "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                                      B Offline
                                      B Offline
                                      Bitbeisser
                                      wrote on last edited by
                                      #41

                                      Lazy programmers might be the first ones that get fired...

                                      W 1 Reply Last reply
                                      0
                                      • R RickZeeland

                                        Would you still prefer Delphi over .Net ?

                                        B Offline
                                        B Offline
                                        Bitbeisser
                                        wrote on last edited by
                                        #42

                                        Well, I am not Mark, but I would prefer Delphi over .Crap any time of the day. Though I am actually using FreePascal mostly these days, which is truly cross-platform compatible, in contrast to .NET which only pretends to be running on anything but Windows. So I am enjoying the benefits of a sane programming language without descending into dependency hell... ;P And as far as compiler warnings go, I tried them always with utmost respect, as almost always, they are at least a precursor for larger problems looming. In the rare exception that I deliberately chose to ignore a warning, this piece of code will properly be mark with some comment as to why, if there is no reasonable workaround to solve offending code.

                                        R 1 Reply Last reply
                                        0
                                        • B Bitbeisser

                                          Lazy programmers might be the first ones that get fired...

                                          W Offline
                                          W Offline
                                          W Balboos GHB
                                          wrote on last edited by
                                          #43

                                          You need to think deeper. If a programmer is lazy, no production means no one remembers any bugs in their software or any other problems - because they've never run anything of theirs. They'll be held onto the longest as they never make any mistakes!!

                                          Ravings en masse^

                                          "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                                          "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                                          B 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups