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. General Programming
  3. Visual Studio
  4. Warning raised in debug mode but not release mode

Warning raised in debug mode but not release mode

Scheduled Pinned Locked Moved Visual Studio
c++visual-studiodebugginghelpquestion
2 Posts 2 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.
  • B Offline
    B Offline
    bren jones
    wrote on last edited by
    #1

    I hope this is an easy one for someone more familiar with the VS8 IDE than me. There was a local variable in my code that was initialized but not referenced and so warning C4189 (level 4) was raised. However, it was only raised when compiling in debug mode. In release mode the warning was not raised. I have the following properties set in my project, under Configuration Properties > C/C++ > General: Warning Level = Level 4 Treat Warnings As Errors = Yes I have triple checked, and these settings are the same for debug and release configurations. I have corrected the bug, but any ideas why the warning was not raised in release mode?

    J 1 Reply Last reply
    0
    • B bren jones

      I hope this is an easy one for someone more familiar with the VS8 IDE than me. There was a local variable in my code that was initialized but not referenced and so warning C4189 (level 4) was raised. However, it was only raised when compiling in debug mode. In release mode the warning was not raised. I have the following properties set in my project, under Configuration Properties > C/C++ > General: Warning Level = Level 4 Treat Warnings As Errors = Yes I have triple checked, and these settings are the same for debug and release configurations. I have corrected the bug, but any ideas why the warning was not raised in release mode?

      J Offline
      J Offline
      Jonathan Darka
      wrote on last edited by
      #2

      It's possible that the variable is optimised out of your release build.


      Darka [Xanya] "I am not a slave to a god that doesn't exist."

      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