Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0008419 [DCSS] Patches tweak have not tried 2014-04-23 05:44 2014-07-19 04:41
Reporter floatingatoll View Status public  
Assigned To neil
Priority normal Resolution done  
Status resolved   Product Branch 0.15 ancient branch
Summary 0008419: files.cc: save_ghost() do_diagnostics redefined twice when BONES_DIAGNOSTIC and WIZARD
Description In certain circumstances, save_ghost() in files.cc overwrites the value of bool do_diagnostics twice, immediately after declaring it.

#ifdef BONES_DIAGNOSTICS
2170	 
2171	    bool do_diagnostics = false;
2172	#ifdef WIZARD
2173	    do_diagnostics = you.wizard;
2174	#endif
2175	#if defined(DEBUG_BONES) || defined(DEBUG_DIAGNOSTICS)
2176	    do_diagnostics = true;
2177	#endif


This produces a static analysis warning about do_diagnostics line 2173 being overwritten immediately at line 2176. Which isn't strictly harmful or anything.

Attached patch fixes the warning in any case.
Additional Information
Tags No tags attached.
Attached Files ? file icon save_ghost.patch [^] (1,391 bytes) 2014-04-23 05:44 [Show Content]

- Relationships

-  Notes
(0026774)
neil (administrator)
2014-07-19 04:41

Fixed in trunk (0.15-a0-2157-g047404e and 0.15-a0-2158-gf27e6ab), thanks! I took a slightly different approach that allowed the variables to be made const.

- Issue History
Date Modified Username Field Change
2014-04-23 05:44 floatingatoll New Issue
2014-04-23 05:44 floatingatoll File Added: save_ghost.patch
2014-07-19 04:41 neil Note Added: 0026774
2014-07-19 04:41 neil Status new => resolved
2014-07-19 04:41 neil Fixed in Branch => 0.15 development branch
2014-07-19 04:41 neil Resolution open => done
2014-07-19 04:41 neil Assigned To => neil


Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker