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 Offline
    Kornfeld Eliyahu PeterK Offline
    Kornfeld Eliyahu Peter
    wrote on last edited by
    #1

    How seriously do you handle them?

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

    "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

    C C M OriginalGriffO R 26 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

      C Offline
      C Offline
      CodeWraith
      wrote on last edited by
      #2

      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 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

        C Offline
        C Offline
        CPallini
        wrote on last edited by
        #3

        Code should compile without warnings, with the -Wall flag set.

        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
          Maximilien
          wrote on last edited by
          #4

          very.

          I'd rather be phishing!

          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

            OriginalGriffO Offline
            OriginalGriffO Offline
            OriginalGriff
            wrote on last edited by
            #5

            My default project is edited to include "Treat warnings as errors: All" and "Warning level: 4", as well as ticking "XML documentation file" - which gives a error if I forget the XML header for a public item. If your code has warnings, there is probably something you haven't thought of ... particularly if you are a beginner.

            Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

            "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
            "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

            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

              R Offline
              R Offline
              RickZeeland
              wrote on last edited by
              #6

              All warnings are on in VS2017, except for some obscure projects made by students, brrrrr X|

              C 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

                H Offline
                H Offline
                HobbyProggy
                wrote on last edited by
                #7

                Visual Studio:

                Quote:

                warning CS0168: The variable '_ex' is declared but never used

                Everybody else: The F! Me: ... So what, i need the Exception message!

                Rules for the FOSW ![^]

                if(!string.IsNullOrWhiteSpace(_signature))
                {
                MessageBox.Show("This is my signature: " + Environment.NewLine + _signature);
                }
                else
                {
                MessageBox.Show("404-Signature not found");
                }

                M D 2 Replies Last reply
                0
                • R RickZeeland

                  All warnings are on in VS2017, except for some obscure projects made by students, brrrrr X|

                  C Offline
                  C Offline
                  CodeWraith
                  wrote on last edited by
                  #8

                  *SOB* Hey! Our code works! * * Or at least something almost similar if you disable the warnings.

                  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.

                  R 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

                    J Offline
                    J Offline
                    Johnny J
                    wrote on last edited by
                    #9

                    Like any normal person: Completely ignoring them! :doh:

                    Anything that is unrelated to elephants is irrelephant
                    Anonymous
                    -----
                    The problem with quotes on the internet is that you can never tell if they're genuine
                    Winston Churchill, 1944
                    -----
                    Never argue with a fool. Onlookers may not be able to tell the difference.
                    Mark Twain

                    1 Reply Last reply
                    0
                    • C CodeWraith

                      *SOB* Hey! Our code works! * * Or at least something almost similar if you disable the warnings.

                      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.

                      R Offline
                      R Offline
                      RickZeeland
                      wrote on last edited by
                      #10

                      Order, order :mad:

                      OriginalGriffO 1 Reply Last reply
                      0
                      • H HobbyProggy

                        Visual Studio:

                        Quote:

                        warning CS0168: The variable '_ex' is declared but never used

                        Everybody else: The F! Me: ... So what, i need the Exception message!

                        Rules for the FOSW ![^]

                        if(!string.IsNullOrWhiteSpace(_signature))
                        {
                        MessageBox.Show("This is my signature: " + Environment.NewLine + _signature);
                        }
                        else
                        {
                        MessageBox.Show("404-Signature not found");
                        }

                        M Offline
                        M Offline
                        MarkTJohnson
                        wrote on last edited by
                        #11

                        I used to go through the code and clean those out but then I decided life was too short. When I did Delphi I would sometimes get a variable not initialized warning but when I initialized it I would get a value assigned but never used warning if the variable was in a try..except block.

                        R 1 Reply Last reply
                        0
                        • R RickZeeland

                          Order, order :mad:

                          OriginalGriffO Offline
                          OriginalGriffO Offline
                          OriginalGriff
                          wrote on last edited by
                          #12

                          2 pints of lager, and a packet of crisps, please.[^]

                          Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                          R 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
                            Munchies_Matt
                            wrote on last edited by
                            #13

                            Depends on the code, sometimes I am intending to do something a bit odd.

                            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 Online
                              K Online
                              Kaladin
                              wrote on last edited by
                              #14

                              Run it through a code analyzer to get more of them!

                              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
                                k5054
                                wrote on last edited by
                                #15

                                In my own code, I like to clean them all up. When compiling packaged software, say the latest version of gcc, I just do the configure/make/make install and ignore the warnings. ISTR a story about the linux kernel, long ago, where some helpful individual went through the code and cleaned up all the warnings. Which was great, until you tried to compile it for something other than an X86 - in which case either the build failed or the kernel broke. :doh:

                                C 1 Reply Last reply
                                0
                                • H HobbyProggy

                                  Visual Studio:

                                  Quote:

                                  warning CS0168: The variable '_ex' is declared but never used

                                  Everybody else: The F! Me: ... So what, i need the Exception message!

                                  Rules for the FOSW ![^]

                                  if(!string.IsNullOrWhiteSpace(_signature))
                                  {
                                  MessageBox.Show("This is my signature: " + Environment.NewLine + _signature);
                                  }
                                  else
                                  {
                                  MessageBox.Show("404-Signature not found");
                                  }

                                  D Offline
                                  D Offline
                                  DerekT P
                                  wrote on last edited by
                                  #16

                                  This issue came up elsewhere in the Lounge[^] a couple of weeks or so ago and the response referred to using the $exception variable in Watch, without the need to define an exception in the catch statement: StackOverflow[^]

                                  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
                                    Marc Clifton
                                    wrote on last edited by
                                    #17

                                    Gollum - "We hates it!"[^]

                                    Latest Article - A 4-Stack rPI Cluster with WiFi-Ethernet Bridging Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                                    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

                                      J Offline
                                      J Offline
                                      Joe Woodbury
                                      wrote on last edited by
                                      #18

                                      I'm very OCD about warnings and even add checking for a dozen more obscure ones. I then pass my code through various analyzers. Many times, seemingly trivial warnings exposed more serious logical 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

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

                                        warnings from the compiler only proves to me the compiler doesn't understand my code.

                                        Message Signature (Click to edit ->)

                                        D 1 Reply Last reply
                                        0
                                        • L Lost User

                                          warnings from the compiler only proves to me the compiler doesn't understand my code.

                                          Message Signature (Click to edit ->)

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

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

                                          W 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