Menu

Warning C4505 in atldlgs.h

2014-04-30
2014-05-07
  • Marcel Raad

    Marcel Raad - 2014-04-30

    If I include atldlgs.h without instantiating CPrintDialogImpl, CPrintDialogExImpl or CPageSetupDialogImpl, I get the following compiler warning:
    warning C4505: 'WTL::_AtlCreateDC' : unreferenced local function has been removed

    Perhaps _AtlCreateDC could be marked inline to suppress this warning? The problem with this warning is that it has to be disabled for the entire compilation unit.

     
    • Nenad Stefanovic

      Hi Marcel,

      This sounds logical, and the description of the warning shows that we
      should expect this. However, I can't reproduce this. atldlgs.h is included
      in App Wizard generated code and it should, in theory, cause this warning,
      but it doesn't. I tried changing many build options but I still can't cause
      this warning to appear.

      Does this also happen for you if you use App Wizard generated project? How
      are build options in your project different than those from App Wizard
      generated project?

      Cheers,
      Nenad

      On Wed, Apr 30, 2014 at 4:16 AM, Marcel Raad marcelraad@users.sf.netwrote:

      If I include atldlgs.h without instantiating CPrintDialogImpl,
      CPrintDialogExImpl or CPageSetupDialogImpl, I get the following compiler
      warning:
      warning C4505: 'WTL::_AtlCreateDC' : unreferenced local function has been
      removed

      Perhaps _AtlCreateDC could be marked inline to suppress this warning? The
      problem with this warning is that it has to be disabled for the entire
      compilation unit.


      Warning C4505 in atldlgs.hhttps://sourceforge.net/p/wtl/discussion/374433/thread/5c4b5ffc/?limit=25#f4ad

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/wtl/discussion/374433/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
      • Nenad Stefanovic

        Hi Marcel,

        You probably have _ATL_ALL_USER_WARNINGS defined - with that the warning
        appears.

        There are two other warnings if _ATL_ALL_USER_WARNINGS is defined, I'll see
        if I can fix all of them.

        Cheers,
        Nenad

        On Wed, Apr 30, 2014 at 3:44 PM, Nenad Stefanovic nenadstefanovic@users.sf.net wrote:

        Hi Marcel,

        This sounds logical, and the description of the warning shows that we
        should expect this. However, I can't reproduce this. atldlgs.h is included
        in App Wizard generated code and it should, in theory, cause this warning,
        but it doesn't. I tried changing many build options but I still can't cause
        this warning to appear.

        Does this also happen for you if you use App Wizard generated project? How
        are build options in your project different than those from App Wizard
        generated project?

        Cheers,
        Nenad

        On Wed, Apr 30, 2014 at 4:16 AM, Marcel Raad marcelraad@users.sf.netwrote:

        If I include atldlgs.h without instantiating CPrintDialogImpl,

        CPrintDialogExImpl or CPageSetupDialogImpl, I get the following compiler
        warning:
        warning C4505: 'WTL::_AtlCreateDC' : unreferenced local function has been
        removed

        Perhaps _AtlCreateDC could be marked inline to suppress this warning? The
        problem with this warning is that it has to be disabled for the entire
        compilation unit.


        Warning C4505 in atldlgs.h
        https://sourceforge.net/p/wtl/discussion/374433/thread/5c4b5ffc/?limit=25#f4ad

        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/wtl/discussion/374433/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/


        Warning C4505 in atldlgs.hhttp://sourceforge.net/p/wtl/discussion/374433/thread/5c4b5ffc/?limit=25#f4ad/d508

        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/wtl/discussion/374433/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/

         
  • Marcel Raad

    Marcel Raad - 2014-05-07

    Hi Nenad,

    sorry for the late response. Yes I compile with _ATL_ALL_USER_WARNINGS defined. The other warnings don't appear because I suppress all warnings for external libraries. r582 in RC4 fixes the issue, thank you very much!

     

Log in to post a comment.