[Commits] [wesnoth/wesnoth] 364ed0: wesnothd/fuh: Fix instances of std::string initial...
GitHub
noreply at github.com
Fri Jun 27 00:04:02 UTC 2014
Branch: refs/heads/1.12
Home: https://github.com/wesnoth/wesnoth
Commit: 364ed0d5369f561dc9f090f552e1e4ed5b792743
https://github.com/wesnoth/wesnoth/commit/364ed0d5369f561dc9f090f552e1e4ed5b792743
Author: Ignacio R. Morelle <shadowm at wesnoth.org>
Date: 2014-06-26 (Thu, 26 Jun 2014)
Changed paths:
M src/server/forum_user_handler.cpp
Log Message:
-----------
wesnothd/fuh: Fix instances of std::string initialized from time_t(0)
Fixes the build with the fuh enabled on clang 3.3:
> src/server/forum_user_handler.cpp:206:10: error: expression which evaluates to zero treated as a null pointer constant of type 'const char *' [-Werror,-Wnon-literal-null-conversion]
> return time_t(0);
> ^~~~~~~~~
> src/server/forum_user_handler.cpp:215:10: error: expression which evaluates to zero treated as a null pointer constant of type 'const char *' [-Werror,-Wnon-literal-null-conversion]
> return time_t(0);
> ^~~~~~~~~
A time_t(0) is cast equivalently to a null pointer, and an empty C
string is equivalent to a null pointer for std::string instantiation.
More information about the Commits
mailing list