Closed
Bug 1124029
Opened 10 years ago
Closed 10 years ago
Fix some warnings when build for win64 with --enable-warnings-as-error
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
FIXED
mozilla38
People
(Reporter: xidorn, Assigned: xidorn)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
|
1.11 KB,
patch
|
davidb
:
review+
|
Details | Diff | Splinter Review |
|
1.07 KB,
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
|
878 bytes,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
|
2.11 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
|
1.08 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8552170 -
Flags: review?(dbolter)
| Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8552171 -
Flags: review?(tnikkel)
| Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8552172 -
Flags: review?(jwalden+bmo)
| Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8552173 -
Flags: review?(benjamin)
| Assignee | ||
Comment 5•10 years ago
|
||
(In reply to Xidorn Quan [:xidorn] (UTC+11) from comment #4)
> Created attachment 8552173 [details] [diff] [review]
> patch 4 - Suppress different __unaligned qualifiers warnings
This patch fixes warnings like:
Warning: C4090 in xpcom\io\nsLocalFileWin.cpp: 'initializing' : different '__unaligned' qualifiers
xpcom/io/nsLocalFileWin.cpp(188) : warning C4090: 'initializing' : different '__unaligned' qualifiers
Comment 6•10 years ago
|
||
Comment on attachment 8552171 [details] [diff] [review]
patch 2 - Fix 64bit shift warning in imgFrame
What's the warning/error that we're fixing here?
| Assignee | ||
Comment 7•10 years ago
|
||
(In reply to Timothy Nikkel (:tn) from comment #6)
> Comment on attachment 8552171 [details] [diff] [review]
> patch 2 - Fix 64bit shift warning in imgFrame
>
> What's the warning/error that we're fixing here?
Warning: C4334 in image\src\imgFrame.h: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
image\src\imgFrame.h(299) : warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
Comment 8•10 years ago
|
||
Comment on attachment 8552171 [details] [diff] [review]
patch 2 - Fix 64bit shift warning in imgFrame
Seeing as the return value is uint32_t, we don't need a 64-bit shift, so why not cast the sizeof to uint32_t instead?
| Assignee | ||
Comment 9•10 years ago
|
||
(In reply to neil@parkwaycc.co.uk from comment #8)
> Comment on attachment 8552171 [details] [diff] [review]
> patch 2 - Fix 64bit shift warning in imgFrame
>
> Seeing as the return value is uint32_t, we don't need a 64-bit shift, so why
> not cast the sizeof to uint32_t instead?
Because according to the context, I think size_t should be the correct type here. I wanted to also change the return type of that function, but I guess it is probably too much for just fixing a warning.
Updated•10 years ago
|
Attachment #8552172 -
Flags: review?(jwalden+bmo) → review+
Updated•10 years ago
|
Attachment #8552171 -
Flags: review?(tnikkel) → review+
| Assignee | ||
Comment 10•10 years ago
|
||
try:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=862b786230e4
with another bug together
| Assignee | ||
Comment 11•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/6785604f4cc8
https://hg.mozilla.org/integration/mozilla-inbound/rev/7315bdbef259
Keywords: leave-open
Updated•10 years ago
|
Attachment #8552170 -
Flags: review?(dbolter) → review+
Comment 12•10 years ago
|
||
Comment 13•10 years ago
|
||
Comment on attachment 8552173 [details] [diff] [review]
patch 4 - Suppress different __unaligned qualifiers warnings
I don't have enough context to know whether the warning is spurious or whether this is a good fix.
Attachment #8552173 -
Flags: review?(benjamin) → review?(nfroyd)
Comment 14•10 years ago
|
||
Comment on attachment 8552173 [details] [diff] [review]
patch 4 - Suppress different __unaligned qualifiers warnings
Review of attachment 8552173 [details] [diff] [review]:
-----------------------------------------------------------------
I couldn't figure out where the __unaligned qualifiers were coming from, since MSDN says ILCreateFromPath returns a PIDLIST_ABSOLUTE, not a PUIDLIST_ABSOLUTE:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd378420%28v=vs.85%29.aspx
https://msdn.microsoft.com/en-us/library/windows/desktop/bb773321%28v=vs.85%29.aspx
But looking at <ShTypes.h>, it looks like if you don't define STRICT_TYPED_ITEMIDS (which actually seems like a good idea), PIDLIST_ABSOLUTE silently inherits an __unaligned qualifier from being defined as a synonym to LPITEMIDLIST.
Attachment #8552173 -
Flags: review?(nfroyd) → review+
| Assignee | ||
Comment 15•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/adbc9eec0490
https://hg.mozilla.org/integration/mozilla-inbound/rev/47834f1829b9
Keywords: leave-open
| Assignee | ||
Updated•10 years ago
|
Keywords: leave-open
Comment 16•10 years ago
|
||
| Assignee | ||
Comment 17•10 years ago
|
||
Fix the same warning as comment 7.
| Assignee | ||
Updated•10 years ago
|
Attachment #8555480 -
Flags: review?(nfroyd)
Updated•10 years ago
|
Attachment #8555480 -
Flags: review?(nfroyd) → review+
| Assignee | ||
Comment 18•10 years ago
|
||
Comment 19•10 years ago
|
||
__unaligned is meaningless in the amd64 build; it's only relevant to the Itanium compiler. Hacking around the warning is fine.
| Assignee | ||
Updated•10 years ago
|
Keywords: leave-open
Comment 20•10 years ago
|
||
Assignee: nobody → quanxunzhen
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in
before you can comment on or make changes to this bug.
Description
•