+2011-02-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ allow C code to suppress warnings about ignored return values
+ * Makefile.in (GNULIB_MODULES): Add ignore-value.
+ * configure, lib/Makefile.in, lib/gnulib.mk, m4/gl-comp.m4: Regenerate.
+
2011-01-31 Chong Yidong <cyd@stupidchicken.com>
* configure.in: Test existence of xaw3d library, not just the
# Update modules from gnulib, for maintainers, who should have it in
# $(gnulib_srcdir) (relative to $(srcdir) and should have build tools
# as per $(gnulib_srcdir)/DEPENDENCIES.
-GNULIB_MODULES = dtoastr getopt-gnu mktime strftime
+GNULIB_MODULES = dtoastr getopt-gnu ignore-value mktime strftime
GNULIB_TOOL_FLAGS = \
--import --no-changelog --no-vc-files --makefile-name=gnulib.mk
sync-from-gnulib: $(gnulib_srcdir)
# Code from module getopt-gnu:
# Code from module getopt-posix:
# Code from module gettext-h:
+ # Code from module ignore-value:
# Code from module include_next:
# Code from module intprops:
# Code from module mktime:
if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
-if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
+if ${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
-if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
+if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = xyes; then :
emacs_cv_xaw3d=yes
else
emacs_cv_xaw3d=no
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+ inline | yes) ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+ ;;
+esac
+
GNULIB_MKTIME=0;
GNULIB_NANOSLEEP=0;
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
-$as_echo_n "checking for inline... " >&6; }
-if ${ac_cv_c_inline+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_inline=$ac_kw
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- test "$ac_cv_c_inline" != no && break
-done
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-$as_echo "$ac_cv_c_inline" >&6; }
-
-case $ac_cv_c_inline in
- inline | yes) ;;
- *)
- case $ac_cv_c_inline in
- no) ac_val=;;
- *) ac_val=$ac_cv_c_inline;;
- esac
- cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
-_ACEOF
- ;;
-esac
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
if ${ac_cv_header_stdbool_h+:} false; then :
# Code from module gettext-h:
+ # Code from module ignore-value:
+
# Code from module include_next:
# Code from module intprops:
# Code from module mktime:
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files dtoastr getopt-gnu mktime strftime
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files dtoastr getopt-gnu ignore-value mktime strftime
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
unistd.h-t warn-on-use.h warn-on-use.h-t
noinst_LIBRARIES = libgnu.a
DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src
-libgnu_a_SOURCES = dtoastr.c gettext.h
+libgnu_a_SOURCES = dtoastr.c gettext.h ignore-value.h
libgnu_a_LIBADD = $(gl_LIBOBJS)
libgnu_a_DEPENDENCIES = $(gl_LIBOBJS)
EXTRA_libgnu_a_SOURCES = ftoastr.c getopt.c getopt1.c mktime.c \
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files dtoastr getopt-gnu mktime strftime
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files dtoastr getopt-gnu ignore-value mktime strftime
MOSTLYCLEANFILES += core *.stackdump
## end gnulib module gettext-h
+## begin gnulib module ignore-value
+
+libgnu_a_SOURCES += ignore-value.h
+
+## end gnulib module ignore-value
+
## begin gnulib module intprops
# Code from module getopt-gnu:
# Code from module getopt-posix:
# Code from module gettext-h:
+ # Code from module ignore-value:
# Code from module include_next:
# Code from module intprops:
# Code from module mktime:
# Code from module gettext-h:
AC_SUBST([LIBINTL])
AC_SUBST([LTLIBINTL])
+ # Code from module ignore-value:
+ AC_REQUIRE([AC_C_INLINE])
# Code from module include_next:
# Code from module intprops:
# Code from module mktime:
lib/getopt1.c
lib/getopt_int.h
lib/gettext.h
+ lib/ignore-value.h
lib/intprops.h
lib/mktime-internal.h
lib/mktime.c
+2011-02-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ allow C code to suppress warnings about ignored return values
+
+ We need to go through the code and for each such warning, either
+ fix the code to pay attention to the returned value, or tell GCC
+ that we really do want to ignore the returned value. Here is one
+ example of how to do the latter.
+ * sysdep.c: Include <ignore-value.h>.
+ (sys_subshell): Suppress an undesirable warning about not checking
+ the returned value of 'write', as there's nothing useful one can
+ do with that returned value.
+
2011-02-03 Jan Djärv <jan.h.d@swipnet.se>
* xterm.c (x_connection_closed): Remove all calls that calls
#endif /* HAVE_LIMITS_H */
#include <unistd.h>
+#include <ignore-value.h>
+
#include "lisp.h"
#include "sysselect.h"
#include "blockinput.h"
init_baud_rate (int fd)
{
int emacs_ospeed;
-
+
if (noninteractive)
emacs_ospeed = 0;
else
write (1, "Can't execute subshell", 22);
#else /* not WINDOWSNT */
execlp (sh, sh, (char *) 0);
- write (1, "Can't execute subshell", 22);
+ ignore_value (write (1, "Can't execute subshell", 22));
_exit (1);
#endif /* not WINDOWSNT */
#endif /* not MSDOS */
}
#endif /* !defined (WINDOWSNT) */
-