[Commits] [wesnoth/wesnoth] b42ca7: Fix useless cast

GitHub noreply at github.com
Fri Nov 3 00:12:20 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: b42ca757da82a20850fd84b486fc871c512f06c5
      https://github.com/wesnoth/wesnoth/commit/b42ca757da82a20850fd84b486fc871c512f06c5
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2017-11-02 (Thu, 02 Nov 2017)

  Changed paths:
    M src/savegame.cpp

  Log Message:
  -----------
  Fix useless cast


  Commit: 052afd4ce8d4c19c6185176e68a4019612d2e5f9
      https://github.com/wesnoth/wesnoth/commit/052afd4ce8d4c19c6185176e68a4019612d2e5f9
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2017-11-02 (Thu, 02 Nov 2017)

  Changed paths:
    M src/scripting/lua_kernel_base.cpp

  Log Message:
  -----------
  Fix missing 'static'

Actual warning was missing declaration. All other functions being exposed to Lua, here, are static so make this one  static also.


  Commit: 23b98e2827fb767ba25a238128f00a057e8e0137
      https://github.com/wesnoth/wesnoth/commit/23b98e2827fb767ba25a238128f00a057e8e0137
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2017-11-02 (Thu, 02 Nov 2017)

  Changed paths:
    M src/variable_info_private.hpp

  Log Message:
  -----------
  Quell missing declaration warnings

This so-called header is actually just splitting a large source file into two files. I would mark these functions static but this is a header; so I'm pre-declaring them in case some other compiler complains about static functions in a header.

Hopefully someone in the future will do something about this smelliness.


  Commit: e0366b1352163cfda4b3eff7c3edd59d1c2605ff
      https://github.com/wesnoth/wesnoth/commit/e0366b1352163cfda4b3eff7c3edd59d1c2605ff
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2017-11-02 (Thu, 02 Nov 2017)

  Changed paths:
    M src/gui/dialogs/statistics_dialog.cpp

  Log Message:
  -----------
  Give up on Coverity for this

Coverity wants a cast to double. Add it and it wants a cast to long long. Add THAT and Coverity and GCC both complain.

I suppose there might be a way to rewrite things to make everyone happy. But it's easier to tell Coverity it's a false positive and force the issue closed.


Compare: https://github.com/wesnoth/wesnoth/compare/ee5a6e03f47f...e0366b135216


More information about the Commits mailing list