Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 322609

Summary: Cleanup warnings for CDT EDC org.eclipse.cdt.debug.edc.windows.agent
Product: [Tools] CDT Reporter: Kirk Beitz <kirk.beitz>
Component: cdt-debug-edcAssignee: Ken Ryall <ken.ryall>
Status: RESOLVED FIXED QA Contact: Ken Ryall <ken.ryall>
Severity: trivial    
Priority: P3 CC: cdtdoug, john.cortell
Version: 7.0   
Target Milestone: 8.0   
Hardware: PC   
OS: Windows All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 323997    
Attachments:
Description Flags
patch to cleanup warnings in org.eclipse.cdt.debug.edc.widows.agent
cdtdoug: iplog+
darn it, i missed a file in the first patch: src/trk_agent/discovery.c cdtdoug: iplog+

Description Kirk Beitz CLA 2010-08-12 21:39:36 EDT
Created attachment 176514 [details]
patch to cleanup warnings in org.eclipse.cdt.debug.edc.widows.agent

building the edc windows agent results in a number of warnings at the moment.

they can be cleaned up with the attached patch.

- almost all warnings that show up in "Problems" currently are of the form of "deprecated auto conversion from string to char*", where the arg or variable causing such a warning is easily declared "const char*" instead.

- one change that's a consequence of the preceding change is that to Logger::Log().  the function has been changed to take const std::string& to disambiguate the varargs version from the one without varargs.  at the most nit-picky level, this should be a performance gain rather than a hit due to the fact that the only callers of this function at this point in time were already storing the value in a std::string and performing .c_str() to pass the arg.

- there are several instances of assignment from function calls to variables that are never used.  the patch comments out these variables, but leaves the comments in a position of pseudo-assignment for a certain readability regarding the performance of the call at that point in the function.
Comment 1 Ken Ryall CLA 2010-08-30 14:53:50 EDT
Committed to HEAD
Comment 2 CDT Genie CLA 2010-08-30 15:23:06 EDT
*** cdt cvs genie on behalf of kryall ***
Bug 322609 -  Cleanup warnings for CDT EDC org.eclipse.cdt.debug.edc.windows.agent

[*] AgentUtils.cpp 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/common_agent/AgentUtils.cpp?root=Tools_Project&r1=1.1&r2=1.2
[*] RunControlService.h 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/common_agent/RunControlService.h?root=Tools_Project&r1=1.1&r2=1.2
[*] Logger.cpp 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/common_agent/Logger.cpp?root=Tools_Project&r1=1.1&r2=1.2
[*] Logger.h 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/common_agent/Logger.h?root=Tools_Project&r1=1.1&r2=1.2
[*] RunControlService.cpp 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/common_agent/RunControlService.cpp?root=Tools_Project&r1=1.1&r2=1.2

[*] protocol.h 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/tcf_agent/framework/protocol.h?root=Tools_Project&r1=1.1&r2=1.2

[*] RegisterInfoX86.cpp 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/win_agent/RegisterInfoX86.cpp?root=Tools_Project&r1=1.1&r2=1.2
[*] WinDebugMonitor.cpp 1.8 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/win_agent/WinDebugMonitor.cpp?root=Tools_Project&r1=1.7&r2=1.8
[*] RegistersService.h 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/win_agent/RegistersService.h?root=Tools_Project&r1=1.2&r2=1.3
[*] MemoryService.h 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/win_agent/MemoryService.h?root=Tools_Project&r1=1.2&r2=1.3
[*] RegisterInfoX86.h 1.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/win_agent/RegisterInfoX86.h?root=Tools_Project&r1=1.1&r2=1.2
[*] MemoryService.cpp 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/win_agent/MemoryService.cpp?root=Tools_Project&r1=1.5&r2=1.6
[*] ProcessService.h 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/win_agent/ProcessService.h?root=Tools_Project&r1=1.2&r2=1.3
[*] RegistersService.cpp 1.5 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/win_agent/RegistersService.cpp?root=Tools_Project&r1=1.4&r2=1.5
[*] SimpleRegistersService.h 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/win_agent/SimpleRegistersService.h?root=Tools_Project&r1=1.2&r2=1.3
[*] LoggingService.h 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/win_agent/LoggingService.h?root=Tools_Project&r1=1.2&r2=1.3
[*] LoggingService.cpp 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/win_agent/LoggingService.cpp?root=Tools_Project&r1=1.5&r2=1.6
[*] SimpleRegistersService.cpp 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/win_agent/SimpleRegistersService.cpp?root=Tools_Project&r1=1.3&r2=1.4
[*] ProcessService.cpp 1.9 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/win_agent/ProcessService.cpp?root=Tools_Project&r1=1.8&r2=1.9

[*] WindowsDebugAgent.cpp 1.8 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc.windows.agent/src/WindowsDebugAgent.cpp?root=Tools_Project&r1=1.7&r2=1.8
Comment 3 Kirk Beitz CLA 2010-08-30 16:19:07 EDT
Created attachment 177781 [details]
darn it, i missed a file in the first patch: src/trk_agent/discovery.c

darn it, i missed a file in the first patch: src/trk_agent/discovery.c

ken, can you add this one, too?  lower priority, since other ecl.bz. issues do not depend upon this one.  but my eclipse synchronize caught that i had missed this one.

patch attached; *augments* previous patch (i.e. does not replace it).
Comment 4 John Cortell CLA 2010-09-03 08:59:21 EDT
BTW, I've configured that project, like all other EDC projects as well as the jtag and memory ones, to treat warnings as errors. So, it should now remain error free.
Comment 5 Kirk Beitz CLA 2010-09-03 12:06:21 EDT
along with discovery.c  (which i don't think has been committed, yet), 
there were a couple of warnings that were not fixed having to do with putting ()s around || plus && .  had you tried building the project with the changed setting?  did you fix the other errors as well?
Comment 6 John Cortell CLA 2010-09-03 12:12:09 EDT
(In reply to comment #5)
> along with discovery.c  (which i don't think has been committed, yet), 
> there were a couple of warnings that were not fixed having to do with putting
> ()s around || plus && .  had you tried building the project with the changed
> setting?  did you fix the other errors as well?

Sorry. I thought this was the java agent. The C agent is another story. I've only been addressing warnings in PDE projects.
Comment 7 John Cortell CLA 2010-09-03 12:14:19 EDT
I've only been addressing warnings in PDE and Java projects.
Comment 8 Kirk Beitz CLA 2010-09-03 12:46:32 EDT
ok, john.  thanks for the clarification.  just didn't want a this c/c++ build to be in a state where i thought it might start failing due to warnings that i know to still be there.  and looking forward to continued warning-free edc java code!