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
d75cc5aa
Commit
d75cc5aa
authored
18 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
configure: Enable the -Wwrite-strings flag.
parent
a7447794
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
+75
-0
75 additions, 0 deletions
configure
configure.ac
+8
-0
8 additions, 0 deletions
configure.ac
with
83 additions
and
0 deletions
configure
+
75
−
0
View file @
d75cc5aa
...
...
@@ -14690,6 +14690,81 @@ echo "${ECHO_T}$ac_cv_c_gcc_decl_after_statement" >&6; }
EXTRACFLAGS="$EXTRACFLAGS -Wdeclaration-after-statement"
fi
{ echo "$as_me:$LINENO: checking for gcc -Wwrite-strings support" >&5
echo $ECHO_N "checking for gcc -Wwrite-strings support... $ECHO_C" >&6; }
if test "${ac_cv_c_gcc_write_strings+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_wine_try_cflags_saved=$CFLAGS
CFLAGS="$CFLAGS -Wwrite-strings"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_gcc_write_strings="yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_c_gcc_write_strings="no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ac_wine_try_cflags_saved
fi
{ echo "$as_me:$LINENO: result: $ac_cv_c_gcc_write_strings" >&5
echo "${ECHO_T}$ac_cv_c_gcc_write_strings" >&6; }
if test "$ac_cv_c_gcc_write_strings" = "yes"
then
EXTRACFLAGS="$EXTRACFLAGS -Wwrite-strings"
fi
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wpointer-arith -Werror"
{ echo "$as_me:$LINENO: checking for broken string.h that generates warnings" >&5
...
...
This diff is collapsed.
Click to expand it.
configure.ac
+
8
−
0
View file @
d75cc5aa
...
...
@@ -949,6 +949,14 @@ int main(void) {
EXTRACFLAGS="$EXTRACFLAGS -Wdeclaration-after-statement"
fi
dnl Check for -Wwrite-strings
AC_CACHE_CHECK([for gcc -Wwrite-strings support], ac_cv_c_gcc_write_strings,
[WINE_TRY_CFLAGS([-Wwrite-strings],ac_cv_c_gcc_write_strings="yes", ac_cv_c_gcc_write_strings="no")])
if test "$ac_cv_c_gcc_write_strings" = "yes"
then
EXTRACFLAGS="$EXTRACFLAGS -Wwrite-strings"
fi
dnl Check for noisy string.h
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wpointer-arith -Werror"
...
...
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