Bug 1103

Summary: Useless assignment in omnet-data-output.cc
Product: ns-3 Reporter: Quincy Tse <quincy.tse>
Component: generalAssignee: Mitch Watrous <watrous>
Status: RESOLVED FIXED    
Severity: trivial CC: tomh
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: Patch that silents both unused variable and useless assignment warnings.
Updated patch

Description Quincy Tse 2011-04-18 03:45:39 UTC
Created attachment 1081 [details]
Patch that silents both unused variable and useless assignment warnings.

src/stats/model/omnet-data-output.cc, in the function isNumeric, contains "useless" assignment (to silent compiler warning regarding unused variable). This causes warnings when the compiler is set to check for useless assignments.

Attached patch uses different code that avoids the use of this variable, and is slightly more verbose, but may not cover the entire range of inputs.
Comment 1 Quincy Tse 2011-04-18 03:56:41 UTC
Created attachment 1082 [details]
Updated patch

Patched code now recognises the following number format:

[-][\d]*[.[\d]*][e[-][\d]*[.[\d]*]]

(note - will accept "-", ".", "e" , "e.", etc as well)
Comment 2 Mitch Watrous 2011-05-13 16:46:39 UTC
Bug closed.

ns-3-dev changeset: 4e1d562d5029