View Issue Details

IDProjectCategoryView StatusLast Update
0004735Spring engineGeneralpublic2015-04-09 09:34
ReporterUnitedMarsupials Assigned Toabma  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version98.0 
Summary0004735: Possible error in rts/System/Platform/CpuID.cpp
Descriptionclang++ warns in this code and it does not look correct. Analysis at http://www.viva64.com/en/b/0293/ calls for correction too.

Please, take a look at this patch -- logical && with a constant makes no sense, but bitwise & might...

--- rts/System/Platform/CpuID.cpp 2014-10-07 16:09:51.000000000 -0400
+++ rts/System/Platform/CpuID.cpp 2015-04-07 20:23:18.000000000 -0400
@@ -142,5 +142,5 @@
                ExecCPUID(&eax, &ebx, &ecx, &edx);

- if ((ebx && 0xFFFF) == 0)
+ if ((ebx & 0xFFFF) == 0)
                        return;

TagsNo tags attached.
Checked infolog.txt for Errors

Activities

cleanrock

2015-04-09 06:39

reporter   ~0014311

This is already fixed since 98.0:
https://github.com/spring/spring/blob/develop/rts/System/Platform/CpuID.cpp#L144

UnitedMarsupials

2015-04-09 06:50

reporter   ~0014312

There are many other similar warnings during build -- clang is very good at finding such things. Should I upload the complete build log?

Issue History

Date Modified Username Field Change
2015-04-08 23:32 UnitedMarsupials New Issue
2015-04-09 06:39 cleanrock Note Added: 0014311
2015-04-09 06:50 UnitedMarsupials Note Added: 0014312
2015-04-09 09:34 abma Status new => closed
2015-04-09 09:34 abma Assigned To => abma
2015-04-09 09:34 abma Resolution open => no change required