Page MenuHome

Fixed `debug` and `full` build warnings for x64 Windows
Needs ReviewPublic

Authored by Loren Osborn (linux_dr) on May 26 2019, 8:13 AM.

Details

Summary

This addresses several build warnings mostly for the Windows and debug builds.

Currently there is 1 remaining linker warning in the debug build. the "full" configuration builds cleanly. As I'm unfamiliar with the CMake and the VS linker I don't know how to resolve the remaining warning.

I began looking into pushing changes upstream, and found many of the /extern libraries we use seem to have diverged from released versions. Still investigating while changes may be applicable to existing versions. We probably want to update many/most of these when 2.81 rolls around.

@Sergey Sharybin (sergey), @LazyDodo (LazyDodo) said that extern was your area of expertise.

Diff Detail

Repository
rB Blender
Branch
osbornl_fixCompileWarnings (branched from master)
Build Status
Buildable 3996
Build 3996: arc lint + arc unit

Event Timeline

Loren Osborn (linux_dr) edited the summary of this revision. (Show Details)May 26 2019, 8:22 AM
  • fixed windows compiler warnings (x64)

I am still getting 4 unaddressed compile warnings, (3 from one issue, and one linker issue). This resolves the remaining issues I see. All feedback welcome.

Loren Osborn (linux_dr) retitled this revision from Fixed debug build warning: Pointer cast to wrong size int. to Fixed "debug" and "full build warnings for x64 Windows.Sat, Jun 29, 12:56 AM
Loren Osborn (linux_dr) edited the summary of this revision. (Show Details)
Loren Osborn (linux_dr) retitled this revision from Fixed "debug" and "full build warnings for x64 Windows to Fixed `debug` and `full` build warnings for x64 Windows.Sat, Jun 29, 12:58 AM
Loren Osborn (linux_dr) edited the summary of this revision. (Show Details)Sun, Jun 30, 6:11 PM
Loren Osborn (linux_dr) updated this revision to Diff 16131.
  • fixed more windows compiler warnings
  • Cleaner solution to alignment attribute fix.
  • Fix to fatal (div by zero) arguments compile warning passed to

initEmptyCell()

  • Resolved memory-leak warning in glog

This brings me down to 1 linker warning for the degub build and none for
the full build

  • fixed more windows compiler warnings
  • Cleaner solution to alignment attribute fix.
  • Fix to fatal (div by zero) arguments passed to initEmptyCell()
  • Resolved memory-leak warning in glog
Nathan Letwory (jesterking) requested changes to this revision.Mon, Jul 1, 6:29 PM
Nathan Letwory (jesterking) added inline comments.
extern/gflags/src/util.h
257

I'd move this #endif after the two asserts. That way the usage of tmppath_len stays within a logical block, even though asserts generally don't compile on non-debug targets.

This revision now requires changes to proceed.Mon, Jul 1, 6:29 PM
LazyDodo (LazyDodo) added inline comments.
extern/gflags/src/util.h
257

This one is already fixed, unused vars is a w4 warn originally we raised to w3 for our code, but in the remove_strict macro (which runs for /extern) we forgot to put it back to w4 .

on top of that this is an edit into a 3rd party dep, which makes updating it to a newer version difficult in the future.

extern/gflags/src/util.h
257

@LazyDodo (LazyDodo), I agree that this is a 3rd party dep, and needs to be addressed upstream, but I'd much rather fix it (upstream) then just hide the warning. (I think hiding the warning is a reasonable stopgap measure for the upcoming release.)

I think @Nathan Letwory (jesterking) makes a good point about properly scoping this change before sending it upstream.

My current goal is to get the final link warning addressed, then start sending out the upstream changes... Then we can decide what upstream changes we want to preempt, if any, and filter out the rest. (I don't anticipate any upstream PRs to result in changes we want to included in the upcoming release, unless a project lead has a very compelling reason to do so.)

Please advise if you prefer a different game-plan,.

  • fixed more windows compiler warnings
  • Cleaner solution to alignment attribute fix.
  • Fix to fatal (div by zero) arguments passed to initEmptyCell()
  • Resolved memory-leak warning in glog
  • cleaner bullet alignment warning fix.
  • Moved endif; fixed new unintialized variable
Loren Osborn (linux_dr) edited the summary of this revision. (Show Details)Tue, Jul 9, 8:24 AM
Loren Osborn (linux_dr) edited the summary of this revision. (Show Details)Tue, Jul 9, 8:29 AM
Loren Osborn (linux_dr) marked an inline comment as done.Tue, Jul 9, 4:59 PM