Skip to content

Commit 0a324ed

Browse files
authored
[mono] Propagate -Werror properly, fix warning (#41996)
1 parent ad434fc commit 0a324ed

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/mono/Makefile.am

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
ACLOCAL_AMFLAGS = -I m4
22

3-
AM_CFLAGS = $(WERROR_CFLAGS)
4-
53
SUBDIRS = @MONO_SUBDIRS@
64
noinst_SUBDIRS = @MONO_NOINST_SUBDIRS@
75
DIST_SUBDIRS = $(SUBDIRS) m4

src/mono/configure.ac

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,9 +1034,8 @@ AM_CONDITIONAL(NINJA, test x$enable_ninja = xyes -a x$HAVE_NINJA != xno)
10341034

10351035
AC_ARG_ENABLE(werror, [ --enable-werror Pass -Werror to the C compiler], werror_flag=$enableval, werror_flag=no)
10361036
if test x$werror_flag = xyes; then
1037-
WERROR_CFLAGS="-Werror"
1037+
SHARED_CFLAGS="$SHARED_CFLAGS -Werror"
10381038
fi
1039-
AC_SUBST([WERROR_CFLAGS])
10401039
AC_SUBST([SHARED_CFLAGS])
10411040

10421041
GLIB_CFLAGS='-I$(top_srcdir)/mono/eglib -I$(top_builddir)/mono/eglib'

src/mono/mono/eglib/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SUBDIRS = . test
66

77
noinst_LTLIBRARIES = libeglib.la
88

9-
AM_CFLAGS = $(WERROR_CFLAGS)
9+
AM_CFLAGS = $(SHARED_CFLAGS)
1010

1111
win_files = \
1212
eglib-config.hw \

src/mono/mono/metadata/cominterop.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4155,6 +4155,7 @@ ves_icall_System_Runtime_InteropServices_Marshal_QueryInterfaceInternal (MonoIUn
41554155
#endif /* HOST_WIN32 */
41564156
#endif /* DISABLE_COM */
41574157

4158+
#ifndef ENABLE_NETCORE
41584159
MonoStringHandle
41594160
ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringBSTR (mono_bstr_const ptr, MonoError *error)
41604161
{
@@ -4164,6 +4165,7 @@ ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringBSTR (mono_bstr_cons
41644165
}
41654166
return mono_string_from_bstr_checked (ptr, error);
41664167
}
4168+
#endif
41674169

41684170
mono_bstr
41694171
ves_icall_System_Runtime_InteropServices_Marshal_BufferToBSTR (const gunichar2* ptr, int len)

0 commit comments

Comments
 (0)