View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001731 | SkyChart | 1-Software | public | 17-06-12 13:09 | 18-10-09 16:35 |
| Reporter | Sasa | Assigned To | Patrick Chevalley | ||
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | resolved | Resolution | no change required | ||
| Platform | Linux 64-bit | OS | Lubuntu | OS Version | 17.04 |
| Product Version | 4.1 SVN | ||||
| Summary | 0001731: cu_catalog - suspicious unconditional loop break | ||||
| Description | Sevela methods in cu_catalog have unconditional break in the loop. For instance: function Tcatalog.ReadDSL(var rec:GcatRec):boolean; begin result:=true; repeat ReadGCat(rec,result); if not result then break; rec.ra:=deg2rad*rec.ra; rec.dec:=deg2rad*rec.dec; if DSLForceColor then begin rec.outlines.valid[vlLinecolor]:=true; rec.outlines.linecolor:=DSLcolor; end; break; until not result; end; Upper code will be executed at most once. I have not analyzed specific methods in order to determinate loop is actually needed or not. | ||||
| Tags | No tags attached. | ||||
|
|
This is because this DSL catalog (nebula contour) is very simple with a single file and no object filter, but I want to keep the same structure as the other catalog for the case I need more in the future. See for example GetGCatS, in this case if the magnitude filter is reach it open the next file and retry. I can replace "until not result;" by "until false;" if this can avoid some confusion in reading the code. |
|
|
Actually I tested here my own automatic Pascal source formatter/indenter with your source code and have noticed this suspicious code... Another similar suspicious code with case structure contain only one case value. If all that is not sign for a bug as you noted, changes are not needed. You may close this, in that case. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 17-06-12 13:09 | Sasa | New Issue | |
| 17-06-25 11:00 | Patrick Chevalley | Assigned To | => Patrick Chevalley |
| 17-06-25 11:00 | Patrick Chevalley | Status | new => assigned |
| 17-06-25 11:00 | Patrick Chevalley | Note Added: 0003861 | |
| 17-06-29 21:51 | Sasa | Note Added: 0003867 | |
| 18-10-09 16:35 | Patrick Chevalley | Status | assigned => resolved |
| 18-10-09 16:35 | Patrick Chevalley | Resolution | open => no change required |