emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r103104: merge: allow C code to suppr


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103104: merge: allow C code to suppress warnings about ignored return values
Date: Thu, 03 Feb 2011 11:30:24 -0800
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103104 [merge]
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Thu 2011-02-03 11:30:24 -0800
message:
  merge: allow C code to suppress warnings about ignored return values
modified:
  ChangeLog
  Makefile.in
  configure
  doc/misc/ChangeLog
  doc/misc/texinfo.tex
  lib/Makefile.in
  lib/gnulib.mk
  m4/gl-comp.m4
  src/ChangeLog
  src/sysdep.c
=== modified file 'ChangeLog'
--- a/ChangeLog 2011-01-31 23:54:50 +0000
+++ b/ChangeLog 2011-02-03 19:29:35 +0000
@@ -1,3 +1,9 @@
+2011-02-03  Paul Eggert  <address@hidden>
+
+       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  <address@hidden>
 
        * configure.in: Test existence of xaw3d library, not just the

=== modified file 'Makefile.in'
--- a/Makefile.in       2011-01-30 23:34:18 +0000
+++ b/Makefile.in       2011-02-03 19:29:35 +0000
@@ -330,7 +330,7 @@
 # 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)

=== modified file 'configure'
--- a/configure 2011-01-31 23:54:50 +0000
+++ b/configure 2011-02-03 19:29:35 +0000
@@ -5826,6 +5826,7 @@
   # 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:
@@ -10597,7 +10598,7 @@
 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
@@ -10631,7 +10632,7 @@
 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
@@ -14330,6 +14331,48 @@
 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;
@@ -14404,48 +14447,6 @@
   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 :
@@ -14888,6 +14889,8 @@
   # Code from module gettext-h:
 
 
+  # Code from module ignore-value:
+
   # Code from module include_next:
   # Code from module intprops:
   # Code from module mktime:

=== modified file 'doc/misc/ChangeLog'
--- a/doc/misc/ChangeLog        2011-02-03 07:37:43 +0000
+++ b/doc/misc/ChangeLog        2011-02-03 19:29:10 +0000
@@ -1,3 +1,8 @@
+2011-02-03  Paul Eggert  <address@hidden>
+
+       * texinfo.tex: Update to version 2011-02-01.10 from gnulib,
+       which in turn is copied from ftp://tug.org/tex/.
+
 2011-02-03  Glenn Morris  <address@hidden>
 
        * faq.texi (Contacting the FSF): Mainly just refer to the web-site.

=== modified file 'doc/misc/texinfo.tex'
--- a/doc/misc/texinfo.tex      2011-01-17 19:01:01 +0000
+++ b/doc/misc/texinfo.tex      2011-02-03 19:29:10 +0000
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2011-01-15.17}
+\def\texinfoversion{2011-02-01.10}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -118,8 +118,8 @@
 \ifx\putwordChapter\undefined   \gdef\putwordChapter{Chapter}\fi
 \ifx\putwordfile\undefined      \gdef\putwordfile{file}\fi
 \ifx\putwordin\undefined        \gdef\putwordin{in}\fi
-\ifx\putwordIndexIsEmpty\undefined     \gdef\putwordIndexIsEmpty{(Index is 
empty)}\fi
-\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is 
nonexistent)}\fi
+\ifx\putwordIndexIsEmpty\undefined       \gdef\putwordIndexIsEmpty{(Index is 
empty)}\fi
+\ifx\putwordIndexNonexistent\undefined   \gdef\putwordIndexNonexistent{(Index 
is nonexistent)}\fi
 \ifx\putwordInfo\undefined      \gdef\putwordInfo{Info}\fi
 \ifx\putwordInstanceVariableof\undefined 
\gdef\putwordInstanceVariableof{Instance Variable of}\fi
 \ifx\putwordMethodon\undefined  \gdef\putwordMethodon{Method on}\fi
@@ -163,10 +163,12 @@
 \chardef\dashChar  = `\-
 \chardef\dotChar   = `\.
 \chardef\exclamChar= `\!
+\chardef\hashChar  = `\#
 \chardef\lquoteChar= `\`
 \chardef\questChar = `\?
 \chardef\rquoteChar= `\'
 \chardef\semiChar  = `\;
+\chardef\slashChar = `\/
 \chardef\underChar = `\_
 
 % Ignore a token.
@@ -557,7 +559,7 @@
 \parseargdef\end{%
   \if 1\csname iscond.#1\endcsname
   \else
-    % The general wording of \badenverr may not be ideal, but... --kasal, 
06nov03
+    % The general wording of \badenverr may not be ideal.
     \expandafter\checkenv\csname#1\endcsname
     \csname E#1\endcsname
     \endgroup
@@ -2253,12 +2255,14 @@
 
 % Markup style setup for left and right quotes.
 \defmarkupstylesetup\markupsetuplq{%
-  \expandafter\let\expandafter \temp \csname 
markupsetuplq\currentmarkupstyle\endcsname
+  \expandafter\let\expandafter \temp
+    \csname markupsetuplq\currentmarkupstyle\endcsname
   \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
 }
 
 \defmarkupstylesetup\markupsetuprq{%
-  \expandafter\let\expandafter \temp \csname 
markupsetuprq\currentmarkupstyle\endcsname
+  \expandafter\let\expandafter \temp
+    \csname markupsetuprq\currentmarkupstyle\endcsname
   \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
 }
 
@@ -2487,6 +2491,22 @@
     \codex
   }
 }
+% Handle @url similarly to \code, but allows line breaks after .#?/ (only).
+{
+  \catcode`\.=\active \catcode`\#=\active
+  \catcode`\?=\active \catcode`\/=\active
+  %
+  \global\def\urefcode{\begingroup
+    \setupmarkupstyle{code}%
+    \catcode\dotChar=\active   \catcode\hashChar=\active
+    \catcode\questChar=\active \catcode\slashChar=\active
+    \let.\urefcodedot
+    \let#\urefcodehash
+    \let?\urefcodequestion
+    \let/\urefcodeslash
+    \codex
+  }
+}
 
 \def\realdash{-}
 \def\codedash{-\discretionary{}{}{}}
@@ -2501,6 +2521,24 @@
              \discretionary{}{}{}}%
             {\_}%
 }
+% we put a little stretch before and after the breakable chars, to help
+% line breaking of long url's.  The unequal skips make look better in
+% cmtt at least, especially for dots.
+\def\urefprestretch{\nobreak \hskip0pt plus.13em }
+\def\urefpoststretch{\allowbreak \hskip0pt plus.1em }
+\def\urefcodedot{\urefprestretch .\urefpoststretch}
+\def\urefcodehash{\urefprestretch \#\urefpoststretch}
+\def\urefcodequestion{\urefprestretch ?\urefpoststretch}
+\def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
+{
+  \catcode`\/=\active
+  \global\def\urefcodeslashfinish{%
+    \urefprestretch \slashChar
+    % Allow line break only after the final / in a sequence of
+    % slashes, to avoid line break between the slashes in http://.
+    \ifx\next/\else \urefpoststretch \fi
+  }
+}
 \def\codex #1{\tclose{#1}\endgroup}
 
 % An additional complication: the above will allow breaks after, e.g.,
@@ -2598,6 +2636,30 @@
   \endlink
 \endgroup}
 
+\def\nouref#1,#2,#3,#4\finish{\begingroup  % doesn't work in @example
+  \unsepspaces
+  \pdfurl{#1}%
+  \setbox0 = \hbox{\ignorespaces #3}%
+  \ifdim\wd0 > 0pt
+    \unhbox0 % third arg given, show only that
+  \else
+    \setbox0 = \hbox{\ignorespaces #2}%
+    \ifdim\wd0 > 0pt
+      \ifpdf
+        \unhbox0             % PDF: 2nd arg given, show only it
+      \else
+        % \empty at the end of \scantokens arg gets rid of
+        % trailing newline (and ultimate spurious whitespace).
+        \unhbox0\ (\urefcode{\scantokens{#1\empty}})% DVI: 2nd arg given,
+                                                    % show both it and url
+      \fi
+    \else
+      \urefcode{\scantokens{#1\empty}}% only url given, so show it
+    \fi
+  \fi
+  \endlink
+\endgroup}
+
 % @url synonym for @uref, since that's how everyone uses it.
 %
 \let\url=\uref
@@ -3034,8 +3096,9 @@
 \newif\ifsetshortcontentsaftertitlepage
  \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
 
-\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm 
\centerline{#1}%
-        \endgroup\page\hbox{}\page}
+\parseargdef\shorttitlepage{%
+  \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
+  \endgroup\page\hbox{}\page}
 
 \envdef\titlepage{%
   % Open one extra group, as we want to close it in the middle of \Etitlepage.
@@ -5243,7 +5306,8 @@
   \global\let\subsubsection = \appendixsubsubsec
 }
 
-\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls 
unnumberedzzz
+% normally unnmhead0 calls unnumberedzzz:
+\outer\parseargdef\unnumbered{\unnmhead0{#1}}
 \def\unnumberedzzz#1{%
   \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
     \global\advance\unnumberedno by 1
@@ -5287,40 +5351,47 @@
 \let\top\unnumbered
 
 % Sections.
+% 
 \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
 \def\seczzz#1{%
   \global\subsecno=0 \global\subsubsecno=0  \global\advance\secno by 1
   \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%
 }
 
-\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls 
appendixsectionzzz
+% normally calls appendixsectionzzz:
+\outer\parseargdef\appendixsection{\apphead1{#1}}
 \def\appendixsectionzzz#1{%
   \global\subsecno=0 \global\subsubsecno=0  \global\advance\secno by 1
   \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%
 }
 \let\appendixsec\appendixsection
 
-\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls 
unnumberedseczzz
+% normally calls unnumberedseczzz:
+\outer\parseargdef\unnumberedsec{\unnmhead1{#1}}
 \def\unnumberedseczzz#1{%
   \global\subsecno=0 \global\subsubsecno=0  \global\advance\secno by 1
   \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
 }
 
 % Subsections.
-\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls 
numberedsubseczzz
+% 
+% normally calls numberedsubseczzz:
+\outer\parseargdef\numberedsubsec{\numhead2{#1}}
 \def\numberedsubseczzz#1{%
   \global\subsubsecno=0  \global\advance\subsecno by 1
   \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%
 }
 
-\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls 
appendixsubseczzz
+% normally calls appendixsubseczzz:
+\outer\parseargdef\appendixsubsec{\apphead2{#1}}
 \def\appendixsubseczzz#1{%
   \global\subsubsecno=0  \global\advance\subsecno by 1
   \sectionheading{#1}{subsec}{Yappendix}%
                  {\appendixletter.\the\secno.\the\subsecno}%
 }
 
-\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls 
unnumberedsubseczzz
+% normally calls unnumberedsubseczzz:
+\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}}
 \def\unnumberedsubseczzz#1{%
   \global\subsubsecno=0  \global\advance\subsecno by 1
   \sectionheading{#1}{subsec}{Ynothing}%
@@ -5328,21 +5399,25 @@
 }
 
 % Subsubsections.
-\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally 
numberedsubsubseczzz
+% 
+% normally numberedsubsubseczzz:
+\outer\parseargdef\numberedsubsubsec{\numhead3{#1}}
 \def\numberedsubsubseczzz#1{%
   \global\advance\subsubsecno by 1
   \sectionheading{#1}{subsubsec}{Ynumbered}%
                  {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}%
 }
 
-\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally 
appendixsubsubseczzz
+% normally appendixsubsubseczzz:
+\outer\parseargdef\appendixsubsubsec{\apphead3{#1}}
 \def\appendixsubsubseczzz#1{%
   \global\advance\subsubsecno by 1
   \sectionheading{#1}{subsubsec}{Yappendix}%
                  {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}%
 }
 
-\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally 
unnumberedsubsubseczzz
+% normally unnumberedsubsubseczzz:
+\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}}
 \def\unnumberedsubsubseczzz#1{%
   \global\advance\subsubsecno by 1
   \sectionheading{#1}{subsubsec}{Ynothing}%
@@ -7237,7 +7312,8 @@
 
 % @inforef is relatively simple.
 \def\inforef #1{\inforefzzz #1,,,,**}
-\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} 
\file{\ignorespaces #3{}},
+\def\inforefzzz #1,#2,#3,#4**{%
+  \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
   node \samp{\ignorespaces#1{}}}
 
 % @node's only job in TeX is to define \lastnode, which is used in
@@ -7298,7 +7374,7 @@
       \toks0 = \expandafter{\lastsection}%
       \immediate \writexrdef{title}{\the\toks0 }%
       \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
-      \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during 
\shipout
+      \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout
     }%
   \fi
 }

=== modified file 'lib/Makefile.in'
--- a/lib/Makefile.in   2011-01-30 23:34:18 +0000
+++ b/lib/Makefile.in   2011-02-03 19:29:35 +0000
@@ -24,7 +24,7 @@
 # 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@
@@ -483,7 +483,7 @@
        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 \

=== modified file 'lib/gnulib.mk'
--- a/lib/gnulib.mk     2011-01-30 23:34:18 +0000
+++ b/lib/gnulib.mk     2011-02-03 19:29:35 +0000
@@ -9,7 +9,7 @@
 # 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
@@ -111,6 +111,12 @@
 
 ## 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
 
 

=== modified file 'm4/gl-comp.m4'
--- a/m4/gl-comp.m4     2011-01-30 23:34:18 +0000
+++ b/m4/gl-comp.m4     2011-02-03 19:29:35 +0000
@@ -34,6 +34,7 @@
   # 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:
@@ -76,6 +77,8 @@
   # 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:
@@ -248,6 +251,7 @@
   lib/getopt1.c
   lib/getopt_int.h
   lib/gettext.h
+  lib/ignore-value.h
   lib/intprops.h
   lib/mktime-internal.h
   lib/mktime.c

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-02-03 13:46:03 +0000
+++ b/src/ChangeLog     2011-02-03 19:29:35 +0000
@@ -1,3 +1,16 @@
+2011-02-03  Paul Eggert  <address@hidden>
+
+       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  <address@hidden>
 
        * xterm.c (x_connection_closed): Remove all calls that calls

=== modified file 'src/sysdep.c'
--- a/src/sysdep.c      2011-01-25 04:08:28 +0000
+++ b/src/sysdep.c      2011-02-03 19:29:35 +0000
@@ -31,6 +31,8 @@
 #endif /* HAVE_LIMITS_H */
 #include <unistd.h>
 
+#include <ignore-value.h>
+
 #include "lisp.h"
 #include "sysselect.h"
 #include "blockinput.h"
@@ -263,7 +265,7 @@
 init_baud_rate (int fd)
 {
   int emacs_ospeed;
- 
+
   if (noninteractive)
     emacs_ospeed = 0;
   else
@@ -578,7 +580,7 @@
        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 */
@@ -3058,4 +3060,3 @@
 }
 
 #endif /* !defined (WINDOWSNT) */
-


reply via email to

[Prev in Thread] Current Thread [Next in Thread]