summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-02-20 16:21:36 +0100
committerHaru <haru@dotalux.com>2016-02-20 16:21:36 +0100
commit3eb7a270958f33590c9472fe5d25fcf49f82b324 (patch)
tree8b02dd83f919a85d61f448c736bb4a1befe48633
parent8aa074958fc2162553055c4083f7696dab12161f (diff)
downloadhercules-3eb7a270958f33590c9472fe5d25fcf49f82b324.tar.gz
hercules-3eb7a270958f33590c9472fe5d25fcf49f82b324.tar.bz2
hercules-3eb7a270958f33590c9472fe5d25fcf49f82b324.tar.xz
hercules-3eb7a270958f33590c9472fe5d25fcf49f82b324.zip
Fixed compile warnings in clang
- Fixed a -Wshorten-64-to-32 warning in case there's no thread-local-storage available - Disabled -Wcast-align for the time being Signed-off-by: Haru <haru@dotalux.com>
-rwxr-xr-xconfigure52
-rw-r--r--configure.in2
-rw-r--r--src/common/thread.c2
3 files changed, 4 insertions, 52 deletions
diff --git a/configure b/configure
index 0e8d178e0..e06129115 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in c235a30.
+# From configure.in 8aa0749.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69.
#
@@ -6911,55 +6911,7 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wcast-align" >&5
-$as_echo_n "checking whether $CC supports -Wcast-align... " >&6; }
- OLD_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror -Wcast-align"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-int foo;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- CFLAGS="$OLD_CFLAGS -Wcast-align"
- # Optionally, run a test
- if test "x" != "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wcast-align" >&5
-$as_echo_n "checking whether $CC can actually use -Wcast-align... " >&6; }
- CFLAGS="$OLD_CFLAGS -Werror -Wcast-align"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- CFLAGS="$OLD_CFLAGS"
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- CFLAGS="$OLD_CFLAGS -Wcast-align"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- CFLAGS="$OLD_CFLAGS"
-
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
+#AC_CHECK_COMPILER_WFLAG(cast-align)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wlogical-op" >&5
$as_echo_n "checking whether $CC supports -Wlogical-op... " >&6; }
diff --git a/configure.in b/configure.in
index 27deb0898..fd60e58c6 100644
--- a/configure.in
+++ b/configure.in
@@ -826,7 +826,7 @@ AC_CHECK_COMPILER_WFLAG(format-y2k)
AC_CHECK_COMPILER_WFLAG(missing-include-dirs)
AC_CHECK_COMPILER_WFLAG(suggest-attribute=noreturn)
AC_CHECK_COMPILER_WFLAG(undef)
-AC_CHECK_COMPILER_WFLAG(cast-align)
+#AC_CHECK_COMPILER_WFLAG(cast-align)
AC_CHECK_COMPILER_WFLAG(logical-op)
AC_CHECK_COMPILER_WFLAG(nested-externs)
AC_CHECK_COMPILER_WFLAG(old-style-definition)
diff --git a/src/common/thread.c b/src/common/thread.c
index 6012791e2..b724344e6 100644
--- a/src/common/thread.c
+++ b/src/common/thread.c
@@ -263,7 +263,7 @@ int rathread_get_tid(void) {
#ifdef WIN32
return (int)GetCurrentThreadId();
#else
- return (intptr_t)pthread_self();
+ return (int)pthread_self();
#endif
#endif