Watch, Follow, &
Connect with Us
Public Report
Report From: C++BuilderX/Compiler    [ Add a report in this area ]  
Report #:  8729   Status: Reported
W8004 is given incorrectly
Project:  C++BuilderX/BC++ 2005 Build #:  1.0
Version:    1.0 Submitted By:   Johnny Willemsen
Report Type:  Minor failure / Design problem Date Reported:  7/30/2004 3:40:52 AM
Severity:    Commonly encountered problem Last Updated: 9/3/2004 5:12:51 PM
Platform:    All versions Internal Tracking #:  
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (1 Total Rating)
5.00 out of 5
Total Votes: 1
I get a W8004 warning when compiling ACE.
Steps to Reproduce:
The warning

[Details] Warning W8004 .\WIN32_Proactor.cpp 159: 'implementation' is assigned a value that is never used in function ACE_WIN32_Proactor::create_asynch_read_stream()

The code

ACE_Asynch_Read_Stream_Impl *
ACE_WIN32_Proactor::create_asynch_read_stream (void)
  ACE_Asynch_Read_Stream_Impl *implementation = 0;
  ACE_NEW_RETURN (implementation,
                  ACE_WIN32_Asynch_Read_Stream (this),
  return implementation;

The ACE_NEW_RETURN is just a plain new operator that makes sure out of memory error are catched and in case an out of memory occurs we return 0, see implementation is defined and returned, so I don't see nay reason I get a W8004

Another use case, give a warning that i is declared and not used.

  int i = 0;

  ACE_Reactor reactor (new ACE_WFMO_Reactor, 1);

  ACE_Event_Handler_var *safe_event_handlers =
    new ACE_Event_Handler_var[number_of_handlers];

  Event_Handler **event_handlers =
    new Event_Handler*[number_of_handlers];

  for (i = 0; i < number_of_handlers; ++i)
      event_handlers[i] =
        new Event_Handler (reactor);

      safe_event_handlers[i] =

Johnny Willemsen at 9/28/2004 4:06:34 AM -
Why speaks the resolution about icons, I get invalid warnings

Server Response from: ETNACODE01