• 0 Posts
  • 33 Comments
Joined 1 year ago
cake
Cake day: June 18th, 2023

help-circle


  • Oh, that makes warnings errors and does not mean “ignore errors”. I’m not too familiar with compiler flags. You could do some mental gymnastics to argue that the unused variable causes the compiler to exit and thus the code is not functioning and thus the unused variable is not a warning but an error :^)


  • dbx12@programming.devtoProgrammer Humor@programming.dev???
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    4 months ago

    I for my part prefer it that way. Makes sure the code stays clean and nobody can just silence the warnings and be done with it. Because why would you accept useless variables that clutter the code in production builds? Imagine coming back after some time and try to understand the code again. At least you have the guarantee the variable is used somehow and not just “hmm, what does this do? … ah, it’s unused”