Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
83676d72
Commit
83676d72
authored
14 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
configure: Disable the unused result warnings when Fortify is enabled.
parent
f31428e1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configure
+57
-0
57 additions, 0 deletions
configure
configure.ac
+11
-0
11 additions, 0 deletions
configure.ac
with
68 additions
and
0 deletions
configure
+
57
−
0
View file @
83676d72
...
...
@@ -11875,6 +11875,63 @@ $as_echo "$ac_cv_c_string_h_warnings" >&6; }
EXTRACFLAGS
=
"
$EXTRACFLAGS
-Wpointer-arith"
fi
saved_CFLAGS
=
"
$CFLAGS
"
CFLAGS
=
"
$CFLAGS
-Werror"
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for broken unused result warnings"
>
&5
$as_echo_n
"checking for broken unused result warnings... "
>
&6
;
}
if
test
"
${
ac_cv_c_unused_result_warnings
+set
}
"
=
set
;
then
:
$as_echo_n
"(cached) "
>
&6
else
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
#include <unistd.h>
int
main ()
{
write(2,"a",1)
;
return 0;
}
_ACEOF
if
ac_fn_c_try_compile
"
$LINENO
"
;
then
:
ac_cv_c_unused_result_warnings
=
no
else
ac_cv_c_unused_result_warnings
=
yes
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest.
$ac_ext
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_cv_c_unused_result_warnings
"
>
&5
$as_echo
"
$ac_cv_c_unused_result_warnings
"
>
&6
;
}
CFLAGS
=
"
$saved_CFLAGS
"
if
test
"
$ac_cv_c_unused_result_warnings
"
=
"yes"
then
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether the compiler supports -Wno-unused-result"
>
&5
$as_echo_n
"checking whether the compiler supports -Wno-unused-result... "
>
&6
;
}
if
test
"
${
ac_cv_cflags__Wno_unused_result
+set
}
"
=
set
;
then
:
$as_echo_n
"(cached) "
>
&6
else
ac_wine_try_cflags_saved
=
$CFLAGS
CFLAGS
=
"
$CFLAGS
-Wno-unused-result"
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
int main(int argc, char **argv) { return 0; }
_ACEOF
if
ac_fn_c_try_link
"
$LINENO
"
;
then
:
ac_cv_cflags__Wno_unused_result
=
yes
else
ac_cv_cflags__Wno_unused_result
=
no
fi
rm
-f
core conftest.err conftest.
$ac_objext
\
conftest
$ac_exeext
conftest.
$ac_ext
CFLAGS
=
$ac_wine_try_cflags_saved
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_cv_cflags__Wno_unused_result
"
>
&5
$as_echo
"
$ac_cv_cflags__Wno_unused_result
"
>
&6
;
}
if
test
$ac_cv_cflags__Wno_unused_result
=
yes
;
then
:
EXTRACFLAGS
=
"
$EXTRACFLAGS
-Wno-unused-result"
fi
fi
if
test
"x
$enable_maintainer_mode
"
=
"xyes"
then
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether the compiler supports -Werror"
>
&5
...
...
This diff is collapsed.
Click to expand it.
configure.ac
+
11
−
0
View file @
83676d72
...
...
@@ -1604,6 +1604,17 @@ then
EXTRACFLAGS="$EXTRACFLAGS -Wpointer-arith"
fi
dnl Fortify enables unused result warnings on a gazillion functions, making it useless
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror"
AC_CACHE_CHECK([for broken unused result warnings], ac_cv_c_unused_result_warnings,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[write(2,"a",1)]])],[ac_cv_c_unused_result_warnings=no],[ac_cv_c_unused_result_warnings=yes]))
CFLAGS="$saved_CFLAGS"
if test "$ac_cv_c_unused_result_warnings" = "yes"
then
WINE_TRY_CFLAGS([-Wno-unused-result])
fi
dnl Enable -Werror for maintainer mode
if test "x$enable_maintainer_mode" = "xyes"
then
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment