Fix warnings
authorReuben Thomas <rrt@sc3d.org>
Sun, 14 Jan 2018 00:39:12 +0000 (00:39 +0000)
committerReuben Thomas <rrt@sc3d.org>
Mon, 15 Jan 2018 14:35:36 +0000 (14:35 +0000)
44 files changed:
bootstrap.conf
lib/.gitignore
src/Makefile.am
src/african.c
src/afrtran.c
src/applemac.c
src/atarist.c
src/bangbang.c
src/base64.c
src/cdcnos.c
src/combine.c
src/common.h
src/dump.c
src/ebcdic.c
src/endline.c
src/flat.c
src/html.c
src/ibmpc.c
src/iconqnx.c
src/iconv.c
src/java.c
src/lat1asci.c
src/lat1ltex.c
src/lat1txte.c
src/main.c
src/mule.c
src/names.c
src/outer.c
src/permut.c
src/quoted.c
src/recode.c
src/recodext.h
src/request.c
src/rfc1345.c
src/task.c
src/testdump.c
src/texinfo.c
src/ucs.c
src/utf16.c
src/utf7.c
src/utf8.c
src/varia.c
src/vn.c
tables.py

index 86f4ed587cee9d34ac4a2e26e24aa52cd8e4234d..930592b9c785d13760f0f1eadf265bd3368054ac 100644 (file)
@@ -54,6 +54,7 @@ gnulib_modules='
         pathmax
         pipe-posix
         quotearg
+        snippet/unused-parameter
         strndup
         sys_wait
         unistd
index eab421c1844777a0409c0c6046c03eb5aea6994e..4901b2eed23ddc00bf9084dd879ae7599781e05d 100644 (file)
 /xmalloc.c
 /xsize.c
 /xsize.h
+/unused-parameter.h
index 46ade0d0884fc3bf41a02cc63962f6d110cbcd5a..ccc80d7a2bf056aa8ea373b5092ccc1bc55df465 100644 (file)
@@ -20,6 +20,7 @@
 AUTOMAKE_OPTIONS = gnits
 bin_PROGRAMS = recode
 lib_LTLIBRARIES = librecode.la
+noinst_LTLIBRARIES = libmerged.la
 man_MANS = recode.1
 include_HEADERS = recode.h recodext.h
 
@@ -36,7 +37,7 @@ C_STEPS = african.c afrtran.c applemac.c atarist.c bangbang.c cdcnos.c \
 ebcdic.c ibmpc.c iconqnx.c lat1asci.c java.c mule.c strip-data.c \
 testdump.c ucs.c utf16.c utf7.c utf8.c varia.c vn.c
 
-ALL_STEPS = $(C_STEPS) $(C_FALLBACKS) $(C_SURFACES) merged.c
+ALL_STEPS = $(C_STEPS) $(C_FALLBACKS) $(C_SURFACES)
 
 L_STEPS = ascilat1.l $(L_FALLBACKS) $(L_SURFACES)
 
@@ -55,9 +56,13 @@ librecode_la_SOURCES = charname.c combine.c fr-charname.c iconv.c \
 names.c outer.c recode.c request.c strip-pool.c task.c $(ALL_STEPS) \
 $(include_HEADERS) $(noinst_HEADERS) $(H_STEPS)
 librecode_la_LDFLAGS = -version-info 0:0:0
+librecode_la_LIBADD = libmerged.la
+
+libmerged_la_SOURCES = merged.c
+libmerged_la_CPPFLAGS = $(NON_WARN_CFLAGS)
 
 loc:
-       cloc $(C_STEPS) $(L_FALLBACKS) $(H_STEPS) $(top_srcdir)/tables.py mergelex.py
+       cloc $(ALL_STEPS) $(L_STEPS) common.h $(H_FALLBACKS) $(H_SURFACES) $(top_srcdir)/tables.py mergelex.py
 
 # Relative to $(srcdir).
 ALAIN = $(KELD)
@@ -67,7 +72,8 @@ MNEMONICS_DS = $(KELD)/iso10646.def $(KELD)/other.def $(KELD)/control.def
 RFC1345_TXT = $(KELD)/rfc1345.txt
 NOMS_CARACS = $(ALAIN)/NomsSeulsfinal.lst
 
-AM_CPPFLAGS = -I.. -I$(srcdir) $(ISYSTEM)$(top_builddir)/lib $(ISYSTEM)$(top_srcdir)/lib $(WARN_CFLAGS)
+NON_WARN_CFLAGS = -I.. -I$(srcdir) $(ISYSTEM)$(top_builddir)/lib $(ISYSTEM)$(top_srcdir)/lib
+AM_CPPFLAGS = $(NON_WARN_CFLAGS) $(WARN_CFLAGS)
 DEFS = -DLIBDIR=\"$(libdir)\" @DEFS@
 
 ETAGS_ARGS = $(L_STEPS)
@@ -121,9 +127,9 @@ testdump.lo ucs.lo utf16.lo utf7.lo utf8.lo varia.lo vn.lo \
 flat.lo html.lo lat1ltex.lo lat1txte.lo rfc1345.lo texinfo.lo \
 base64.lo dump.lo endline.lo permut.lo quoted.lo \
 iconv.lo outer.lo decsteps.h inisteps.h tersteps.h: stamp-steps
-stamp-steps: $(ALL_STEPS)
+stamp-steps: $(ALL_STEPS) merged.c
        @echo "Updating {dec,ini,ter}steps.h"
-       @(cd $(srcdir) && grep -h '^module_' $(ALL_STEPS)) \
+       @(cd $(srcdir) && grep -h '^module_' $(ALL_STEPS) merged.c) \
            | sed 's/ .*//' > liste.tmp
        @sed 's/\(.*\)/bool \1 (struct recode_outer *);/' \
            liste.tmp > decsteps.tmp
index ec333924550e89b7c0c837762cc83c0d69b171a5..3da0701fbadb896bbf4e2ab66527214345d5ca16 100644 (file)
@@ -3,6 +3,7 @@
    François Pinard <pinard@iro.umontreal.ca>, 1997.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 /* Bambara, Ewondo and Fulfude.  */
 
@@ -131,7 +132,7 @@ module_african (RECODE_OUTER outer)
   return true;
 }
 
-void
-delmodule_african (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_african (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index 979520bf9a7133b4d253bcadd25d23b6cc0016f1..8f13d29874ffd5393ba0d74fd6da16efa7280f8c 100644 (file)
@@ -3,6 +3,7 @@
    François Pinard <pinard@iro.umontreal.ca>, 1997.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 static const unsigned short ful_data[] =
   {
@@ -346,7 +347,7 @@ module_afrtran (RECODE_OUTER outer)
   return true;
 }
 
-void
-delmodule_afrtran (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_afrtran (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index e96a42d6a6a915eec21ee32912a0776fc4960acf..20c8f044f499f6ec28a2385202d208a997b27154 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 /* Previously, the LF surface was built-in.  It is now handled through a
    separate, optional step.  An optimisation might use a flag to trigger old
@@ -180,7 +181,7 @@ module_applemac (RECODE_OUTER outer)
   return true;
 }
 
-void
-delmodule_applemac (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_applemac (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index eae6c9523a5534d5c9b193ff7a7b32201ead0530..30d48724810dd52a9c243e9bf96e704769e4b526 100644 (file)
@@ -21,6 +21,7 @@
 #define USE_RFC1345_STEP 1
 
 #include "common.h"
+#include "decsteps.h"
 
 /* RFC 1345 style description for AtariST (non official).
 
@@ -227,7 +228,7 @@ module_atarist (RECODE_OUTER outer)
 #endif
 }
 
-void
-delmodule_atarist (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_atarist (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index a44758087990f357e2c24daa3f3e5d38a291b9ed..ab260301fbe8b8c5c38e5a496c8764cd4a78cadb 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 static const char *const translation_table[256] =
   {
@@ -283,7 +284,7 @@ static const char *const translation_table[256] =
 
 static bool
 init_latin1_bangbang (RECODE_STEP step,
-                     RECODE_CONST_REQUEST request,
+                     RECODE_CONST_REQUEST request _GL_UNUSED_PARAMETER,
                      RECODE_CONST_OPTION_LIST before_options,
                      RECODE_CONST_OPTION_LIST after_options)
 {
@@ -390,7 +391,7 @@ module_bangbang (RECODE_OUTER outer)
                       NULL, transform_bangbang_latin1);
 }
 
-void
-delmodule_bangbang (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_bangbang (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index d44d84ed3c3101342cd57031641041e94c4407d0..a53a12ae16801105dec1fabaf470d185f2d729c4 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 #include "base64.h"
 
 /* Table of characters coding the 64 values.  */
@@ -257,7 +258,7 @@ module_base64 (RECODE_OUTER outer)
     && declare_alias (outer, "64", "Base64");
 }
 
-void
-delmodule_base64 (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_base64 (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index 8b67cd7845ab4de706ba6c41152434e917313260..b18e5f88fe7784f7f966983cef78cb65539b73e0 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 static const char *const translation_table[128] =
   {
@@ -313,6 +314,9 @@ transform_cdcnos_ascii (RECODE_SUBTASK subtask)
                  SUBTASK_RETURN (subtask);
              }
          break;
+
+        default:
+          break;
        }
       put_byte (input_char, subtask);
     }
@@ -332,7 +336,7 @@ module_cdcnos (RECODE_OUTER outer)
     && declare_alias (outer, "NOS", "CDC-NOS");
 }
 
-void
-delmodule_cdcnos (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_cdcnos (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index b7fc116f0be5f30bbdfb04fa277fbb7d1f2896d2..43c910f774ea574705d354a274159d1e8588fc1d 100644 (file)
@@ -81,7 +81,7 @@ combined_compare (const void *void_first, const void *void_second)
 
 bool
 init_explode (RECODE_STEP step,
-             RECODE_CONST_REQUEST request,
+             RECODE_CONST_REQUEST request _GL_UNUSED_PARAMETER,
              RECODE_CONST_OPTION_LIST before_options,
              RECODE_CONST_OPTION_LIST after_options)
 {
@@ -124,7 +124,7 @@ explode_byte_byte (RECODE_SUBTASK subtask)
   Hash_table *table = (Hash_table *) subtask->step->step_table;
   unsigned value;
 
-  while (value = get_byte (subtask), value != EOF)
+  while (value = get_byte (subtask), value != (unsigned)EOF)
     {
       unsigned short lookup = value;
       unsigned short *result = (unsigned short *) hash_lookup (table, &lookup);
@@ -178,7 +178,7 @@ explode_byte_ucs2 (RECODE_SUBTASK subtask)
   Hash_table *table = (Hash_table *) subtask->step->step_table;
   unsigned value;
 
-  if (value = get_byte (subtask), value != EOF)
+  if (value = get_byte (subtask), value != (unsigned)EOF)
     {
       if (subtask->task->byte_order_mark)
        put_ucs2 (BYTE_ORDER_MARK, subtask);
@@ -198,7 +198,7 @@ explode_byte_ucs2 (RECODE_SUBTASK subtask)
          else
            put_ucs2 (value, subtask);
 
-         if (value = get_byte (subtask), value == EOF)
+         if (value = get_byte (subtask), value == (unsigned)EOF)
            break;
        }
     }
@@ -374,7 +374,7 @@ find_shifted_state (struct state *state, unsigned character,
 
 bool
 init_combine (RECODE_STEP step,
-             RECODE_CONST_REQUEST request,
+             RECODE_CONST_REQUEST request _GL_UNUSED_PARAMETER,
              RECODE_CONST_OPTION_LIST before_options,
              RECODE_CONST_OPTION_LIST after_options)
 {
@@ -478,7 +478,7 @@ combine_byte_byte (RECODE_SUBTASK subtask)
   struct state *state = NULL;
   unsigned value;
 
-  if (value = get_byte (subtask), value != EOF)
+  if (value = get_byte (subtask), value != (unsigned)EOF)
     {
       while (true)
        {
@@ -488,7 +488,7 @@ combine_byte_byte (RECODE_SUBTASK subtask)
          if (shift)
            {
              state = shift;
-             if (value = get_byte (subtask), value == EOF)
+             if (value = get_byte (subtask), value == (unsigned)EOF)
                break;
            }
          else if (state)
@@ -502,7 +502,7 @@ combine_byte_byte (RECODE_SUBTASK subtask)
          else
            {
              put_byte (value, subtask);
-             if (value = get_byte (subtask), value == EOF)
+             if (value = get_byte (subtask), value == (unsigned)EOF)
                break;
            }
        }
@@ -571,7 +571,7 @@ combine_byte_ucs2 (RECODE_SUBTASK subtask)
 {
   unsigned value;
 
-  if (value = get_byte (subtask), value != EOF)
+  if (value = get_byte (subtask), value != (unsigned)EOF)
     {
       struct state *state = NULL;
 
@@ -586,7 +586,7 @@ combine_byte_ucs2 (RECODE_SUBTASK subtask)
          if (shift)
            {
              state = shift;
-             if (value = get_byte (subtask), value == EOF)
+             if (value = get_byte (subtask), value == (unsigned)EOF)
                break;
            }
          else if (state)
@@ -600,7 +600,7 @@ combine_byte_ucs2 (RECODE_SUBTASK subtask)
          else
            {
              put_ucs2 (value, subtask);
-             if (value = get_byte (subtask), value == EOF)
+             if (value = get_byte (subtask), value == (unsigned)EOF)
                break;
            }
        }
index 857495ca671f6debf17fe339ac09524941386e36..1aed7b878a76a3033e1f924131fcb6101dc01361 100644 (file)
@@ -37,6 +37,7 @@
 #include "localcharset.h"
 #include "error.h"
 #include "gettext.h"
+#include "unused-parameter.h"
 
 #if ENABLE_NLS
 # define _(Text) gettext (Text)
index 07b7ac52947f5c8ee1ed7d6a21f97d33c659db3c..f49fdc64011d9f218a5f8b55b61be6a41496f5aa 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 /* Constants for the possible bases.  If these are reordered, so should be
    the initialisers for the three tables which follow.  */
@@ -93,7 +94,10 @@ dump (RECODE_SUBTASK subtask,
 
       /* Write formatted value.  */
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
       sprintf (buffer, format_table[base][byte_count], value);
+#pragma GCC diagnostic pop
       for (cursor = buffer; *cursor; cursor++)
        put_byte (*cursor, subtask);
 
@@ -238,6 +242,9 @@ undump (RECODE_SUBTASK subtask,
            else
              break;
          break;
+
+        default:
+          break;
        }
 
       if (width == 0 || width > width_table[base][expected_size])
@@ -276,13 +283,8 @@ undump (RECODE_SUBTASK subtask,
            size = expected_size;
 
          /* Produce the output bytes.  */
-
-         {
-           unsigned shift;
-
-           for (shift = size * 8; shift != 0; shift -= 8)
-             put_byte (MASK (8) & value >> (shift - 8), subtask);
-         }
+          for (unsigned shift = size; shift != 0; shift--)
+            put_byte (MASK (8) & value >> ((shift * 8) - 8), subtask);
        }
 
       /* Skip separators.  */
@@ -460,7 +462,7 @@ module_dump (RECODE_OUTER outer)
   return true;
 }
 
-void
-delmodule_dump (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_dump (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index d7c648f9425bdffcc4665c2a64e3257c8644b1e4..75dbbc15bb42020a79a42844dcf6e17edb579ddc 100644 (file)
@@ -21,6 +21,7 @@
 /* Previously: #define ASCII "ASCII-BS" */
 
 #include "common.h"
+#include "decsteps.h"
 
 static unsigned char const ascii_to_ebcdic[256] =
   {
@@ -137,7 +138,7 @@ static unsigned char const ascii_to_ebcdic_ibm[256] =
 
 static bool
 init_ascii_ebcdic (RECODE_STEP step,
-                  RECODE_CONST_REQUEST request,
+                  RECODE_CONST_REQUEST request _GL_UNUSED_PARAMETER,
                   RECODE_CONST_OPTION_LIST before_options,
                   RECODE_CONST_OPTION_LIST after_options)
 {
@@ -171,7 +172,7 @@ init_ebcdic_ascii (RECODE_STEP step,
 
 static bool
 init_ascii_ebcdic_ccc (RECODE_STEP step,
-                      RECODE_CONST_REQUEST request,
+                      RECODE_CONST_REQUEST request _GL_UNUSED_PARAMETER,
                       RECODE_CONST_OPTION_LIST before_options,
                       RECODE_CONST_OPTION_LIST after_options)
 {
@@ -206,7 +207,7 @@ init_ebcdic_ccc_ascii (RECODE_STEP step,
 
 static bool
 init_ascii_ebcdic_ibm (RECODE_STEP step,
-                      RECODE_CONST_REQUEST request,
+                      RECODE_CONST_REQUEST request _GL_UNUSED_PARAMETER,
                       RECODE_CONST_OPTION_LIST before_options,
                       RECODE_CONST_OPTION_LIST after_options)
 {
@@ -262,7 +263,7 @@ module_ebcdic (RECODE_OUTER outer)
                       init_ebcdic_ibm_ascii, transform_byte_to_byte);
 }
 
-void
-delmodule_ebcdic (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_ebcdic (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index 5038c292307c3938196f45ef4c7fb113d93b534b..1ed979680a733dbf92bb72b4e6be6b1a9ad16de0 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 #define CR 13                  /* carriage return */
 #define LF 10                  /* line feed */
@@ -169,7 +170,7 @@ module_endline (RECODE_OUTER outer)
     && declare_alias (outer, "cl", "CR-LF");
 }
 
-void
-delmodule_endline (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_endline (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index 5b30fcd96962e2536662ee814b865232e059583c..dd6efc131509452f878070b2d693f9b143eacc64 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 static bool
 transform_ascii_flat (RECODE_SUBTASK subtask)
@@ -108,7 +109,7 @@ module_flat (RECODE_OUTER outer)
   return true;
 }
 
-void
-delmodule_flat (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_flat (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index 05e1fd53a090732e524191704a55402547a069a7..c4591f932b82a0119a9fa1769a20c9db7ae38f0b 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 #include "hash.h"
 
 /* FIXME: An @code{HTML} text which has spurious semi-colons to end entities
@@ -918,7 +919,7 @@ module_html (RECODE_OUTER outer)
     && declare_alias (outer, "h", "HTML_4.0");
 }
 
-void
-delmodule_html (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_html (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index 6fcdffae16fca72423933ed20e54acbc9e03f3b0..227cf5f73da4451348d6c2dc6a8310d12c7a5cb9 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 /* Previously, the CR-LF surface was built-in.  It is now handled through a
    separate, optional step.  An optimisation might use a flag to trigger old
@@ -388,7 +389,7 @@ module_ibmpc (RECODE_OUTER outer)
   return true;
 }
 
-void
-delmodule_ibmpc (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_ibmpc (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index 9d5f4a8fbbfc7fd7a78c6f3edd3166933136f1a0..da7bfa8eddbcd8a190c16af43ecd24f30efad51a 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 #define DOS_CR 13              /* carriage return */
 #define DOS_LF 10              /* line feed */
@@ -228,7 +229,7 @@ module_iconqnx (RECODE_OUTER outer)
     && declare_alias (outer, "QNX", "Icon-QNX");
 }
 
-void
-delmodule_iconqnx (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_iconqnx (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index a16c10f728449487f7405fd6c8e9e13050051507..edef0e6dddd87eb55b3a94ec22227f8b953805df 100644 (file)
@@ -19,6 +19,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 #include <iconv.h>
 #include "iconvdecl.h"
 
@@ -204,7 +205,7 @@ module_iconv (RECODE_OUTER outer)
   return true;
 }
 
-void
-delmodule_iconv (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_iconv (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index f90dc0e298d52f60bab11a316ae1a22a32281e6c..5b235d9ca9b5849c112aba9741e74897592f445f 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 static bool
 transform_java_utf16 (RECODE_SUBTASK subtask)
@@ -110,7 +111,7 @@ module_java (RECODE_OUTER outer)
                       NULL, transform_java_utf16);
 }
 
-void
-delmodule_java (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_java (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index 8355b8321b14ffb82bdc0e8b19ebef51f8eee4a1..736ee39f55063788bbaac3b5587fa8295cf299a7 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 static const char *const translation_table[128] =
   {
@@ -196,7 +197,7 @@ module_latin1_ascii (RECODE_OUTER outer)
   return true;
 }
 
-void
-delmodule_latin1_ascii (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_latin1_ascii (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index db388a1203bd7413e2e65a792613ede5eb095d87..958941c25437aecf158b261a3c005f7aec5b1762 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 struct translation
   {
@@ -174,7 +175,7 @@ module_latin1_latex (RECODE_OUTER outer)
     && declare_alias (outer, "ltex", "LaTeX");
 }
 
-void
-delmodule_latin1_latex (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_latin1_latex (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index cc68f8b319dda0ce093e2cc9d2848b95c51e8093..5aade2c0f2335b82407cfdf671ef7ec673da46b1 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 static const char *const translation_table[128] =
   {
@@ -222,7 +223,7 @@ module_latin1_texte (RECODE_OUTER outer)
     && declare_alias (outer, "txte", "Texte");
 }
 
-void
-delmodule_latin1_texte (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_latin1_texte (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index 39d7f54ddc867c1f807faa81df302f600d2cb411..44a56752363ed18bdacec29db9a5fe4a3a472fcf 100644 (file)
@@ -400,6 +400,9 @@ main (int argc, char *const *argv)
          case 2:
            task_option.strategy = RECODE_SEQUENCE_WITH_PIPE;
            break;
+
+          default:
+            break;
          }
        break;
 
@@ -530,6 +533,9 @@ main (int argc, char *const *argv)
            case 3:
              list_format = RECODE_FULL_FORMAT;
              break;
+
+            default:
+              break;
            }
        break;
 
index 83c06d02e51cac8ea579487ea482ee71308e72d4..a1df8f81ed35d52122c84447f64a61669c9b2238 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 static bool
 transform_latin_mule (RECODE_SUBTASK subtask,
@@ -111,7 +112,7 @@ module_mule (RECODE_OUTER outer)
                       NULL, transform_mule_latin2);
 }
 
-void
-delmodule_mule (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_mule (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index bf94bf443d4224036f82ac0e606edb3c3b258d05..c3583a10d4f5a9b2d6a33aab2a83f9b4eca9cb0f 100644 (file)
@@ -26,7 +26,7 @@
 | negative number if this symbol is not defined.                          |
 `-------------------------------------------------------------------------*/
 
-int
+_GL_ATTRIBUTE_PURE int
 code_to_ucs2 (RECODE_CONST_SYMBOL charset, unsigned code)
 {
   const struct strip_data *data = (const struct strip_data *) charset->data;
@@ -41,7 +41,7 @@ code_to_ucs2 (RECODE_CONST_SYMBOL charset, unsigned code)
 | Return true if BEFORE to AFTER is currently restricted.  |
 `---------------------------------------------------------*/
 
-static bool
+static _GL_ATTRIBUTE_PURE bool
 check_restricted (RECODE_CONST_OUTER outer,
                  RECODE_CONST_SYMBOL before,
                  RECODE_CONST_SYMBOL after)
@@ -241,6 +241,9 @@ disambiguate_name (RECODE_OUTER outer,
          result = ordinal < 0 ? NULL : outer->realname_surface_array[ordinal];
        }
       break;
+
+    default:
+      break;
     }
 
   free (hashname);
@@ -536,7 +539,7 @@ make_argmatch_arrays (RECODE_OUTER outer)
 | values for run of decimal digits at first.                               |
 `-------------------------------------------------------------------------*/
 
-static int
+static _GL_ATTRIBUTE_PURE int
 compare_strings (const char *stringA, const char *stringB)
 {
   int delayed = 0;
@@ -916,10 +919,13 @@ list_concise_charset (RECODE_OUTER outer,
 
            /* FIXME: Trailing space elimination is not always effective.  */
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
            if (ucs2 >= 0)
              printf (format, code);
            else if (mnemonic || counter2 != 112)
              fputs (blanks,  stdout);
+#pragma GCC diagnostic pop
 
            if (mnemonic)
              printf (counter2 == 112 ? " %s\n" : " %-3s", mnemonic);
@@ -942,7 +948,7 @@ list_full_charset_line (int code, recode_ucs2 ucs2, bool french)
   const char *charname;
 
   if (code >= 0)
-    printf ("%3d  %.3o  %.2x", code, code, code);
+    printf ("%3d  %.3o  %.2x", code, (unsigned)code, (unsigned)code);
   else
     fputs (" +    +   + ", stdout);
 
@@ -1148,7 +1154,7 @@ find_and_report_subsets (RECODE_OUTER outer)
                  printf ("[  0] %s == %s\n",
                          charset1->name, charset2->name);
                else
-                 printf ("[%3d] %s < %s\n", distance,
+                 printf ("[%3u] %s < %s\n", distance,
                          charset1->name, charset2->name);
 
                success = false;
index cd68e9160b1fc2b6e2872cc826eb2ca7398ed89b..336a2825fd3303e1dcdb1f345b893f341dd13d2d 100644 (file)
@@ -25,8 +25,8 @@
 | coding as a fallback, which is the traditional Recode behaviour.       |
 `-----------------------------------------------------------------------*/
 
-bool
-reversibility (RECODE_SUBTASK subtask, unsigned code)
+_GL_ATTRIBUTE_CONST bool
+reversibility (RECODE_SUBTASK subtask _GL_UNUSED_PARAMETER, unsigned code _GL_UNUSED_PARAMETER)
 {
   return false;
 }
@@ -299,7 +299,7 @@ declare_strip_data (RECODE_OUTER outer, struct strip_data *data,
 `---------------------------------------------------------------*/
 
 static void
-estimate_single_cost (RECODE_OUTER outer, RECODE_SINGLE single)
+estimate_single_cost (RECODE_OUTER outer _GL_UNUSED_PARAMETER, RECODE_SINGLE single)
 {
   int cost;
 
@@ -330,6 +330,9 @@ estimate_single_cost (RECODE_OUTER outer, RECODE_SINGLE single)
     case RECODE_N:
       /* Analysing varysizes is surely much harder than producing them.  */
       cost += 60;
+
+    default:
+      break;
     }
 
   switch (single->quality.out_size)
@@ -353,6 +356,9 @@ estimate_single_cost (RECODE_OUTER outer, RECODE_SINGLE single)
       /* Writing varysizes requires loops and such.  */
       cost += 35;
       break;
+
+    default:
+      break;
     }
 
   /* Consider speed for fine tuning the cost.  */
@@ -460,7 +466,7 @@ register_all_modules (RECODE_OUTER outer)
   return true;
 }
 
-void static
+static void
 unregister_all_modules (RECODE_OUTER outer)
 {
 #include "tersteps.h"
index 4722983c3837916c2f6d1856115c1316ed69c1b5..6c1c04ea606f87dfb346bfea74bcfc76e31dfcad 100644 (file)
@@ -19,6 +19,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 static bool
 permute_21 (RECODE_SUBTASK subtask)
@@ -112,7 +113,7 @@ module_permutations (RECODE_OUTER outer)
     && declare_alias (outer, "swabytes", "21-Permutation");
 }
 
-void
-delmodule_permutations (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_permutations (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index 9f25761fefef8a5d7f9c4f7914894871b7e59f2a..b8258092d541f5e76c7b1de9c573a79b00b8dd77 100644 (file)
@@ -18,6 +18,8 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
+
 static const bool bitnet_flag = false;
 
 /* Maximum number of characters per MIME line.  */
@@ -358,7 +360,7 @@ module_quoted_printable (RECODE_OUTER outer)
     && declare_alias (outer, "QP", "Quoted-Printable");
 }
 
-void
-delmodule_quoted_printable (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_quoted_printable (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index ccd1103696059dca177ccce5a4843d26004d61cd..73722867b77e3ed9355eec2ebecd9a3b962a2b65 100644 (file)
@@ -21,6 +21,7 @@
 
 /* Global declarations and definitions.  */
 
+#include <stdio.h>
 #include <ctype.h>
 #include <unistd.h>
 
@@ -32,8 +33,8 @@ extern const char *program_name;
 
 #include <stdarg.h>
 
-void
-recode_error (RECODE_OUTER outer, const char *format, ...)
+_GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) void
+recode_error (RECODE_OUTER outer _GL_UNUSED_PARAMETER, const char *format, ...)
 {
   va_list args;
 
@@ -44,8 +45,8 @@ recode_error (RECODE_OUTER outer, const char *format, ...)
   fflush (stderr);
 }
 
-void
-recode_perror (RECODE_OUTER outer, const char *format, ...)
+_GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) void
+recode_perror (RECODE_OUTER outer _GL_UNUSED_PARAMETER, const char *format, ...)
 {
   int saved_errno = errno;
   va_list args;
@@ -104,7 +105,7 @@ invert_table (RECODE_OUTER outer, const unsigned char *table)
     {
       if (flag[table[counter]])
        {
-         recode_error (outer, _("Codes %3d and %3d both recode to %3d"),
+         recode_error (outer, _("Codes %3d and %3u both recode to %3d"),
                        result[table[counter]], counter, table[counter]);
          table_error = true;
        }
@@ -118,7 +119,7 @@ invert_table (RECODE_OUTER outer, const unsigned char *table)
     {
       for (counter = 0; counter < 256; counter++)
        if (!flag[counter])
-         recode_error (outer, _("No character recodes to %3d"), counter);
+         recode_error (outer, _("No character recodes to %3u"), counter);
       recode_error (outer, _("Cannot invert given one-to-one table"));
     }
   return result;
@@ -180,7 +181,7 @@ complete_pairs (RECODE_OUTER outer, RECODE_STEP step,
              table_error = true;
            }
          recode_error (outer,
-                       _("Pair no. %d: <%3d, %3d> conflicts with <%3d, %3d>"),
+                       _("Pair no. %u: <%3d, %3d> conflicts with <%3d, %3d>"),
                        counter, left, right, left, left_table[left]);
        }
       else if (right_flag[right])
@@ -192,7 +193,7 @@ complete_pairs (RECODE_OUTER outer, RECODE_STEP step,
              table_error = true;
            }
          recode_error (outer,
-                       _("Pair no. %d: <%3d, %3d> conflicts with <%3d, %3d>"),
+                       _("Pair no. %u: <%3d, %3d> conflicts with <%3d, %3d>"),
                        counter, left, right, right_table[right], right);
        }
       else
@@ -547,12 +548,15 @@ recode_format_table (RECODE_REQUEST request,
          printf ("@%s =\n", name);
          printf ("  (\n");
          break;
+
+        default:
+          break;
        }
       for (counter = 0; counter < 256; counter++)
        {
          printf ("%s%3d,", counter % 8 == 0 ? "    " : " ", table[counter]);
          if (counter % 8 == 7)
-           printf ("\t%s%3d - %3d%s",
+           printf ("\t%s%3u - %3u%s",
                    start_comment, counter - 7, counter, end_comment);
        }
       switch (header_language)
@@ -567,6 +571,9 @@ recode_format_table (RECODE_REQUEST request,
        case RECODE_LANGUAGE_PERL:
          printf ("  );\n");
          break;
+
+        default:
+          break;
        }
     }
   else if (step->step_type == RECODE_BYTE_TO_STRING)
@@ -589,6 +596,9 @@ recode_format_table (RECODE_REQUEST request,
          printf ("@%s =\n", name);
          printf ("  (\n");
          break;
+
+        default:
+          break;
        }
       for (counter = 0; counter < 256; counter++)
        {
@@ -669,6 +679,9 @@ recode_format_table (RECODE_REQUEST request,
                printf ("''");
                column += 2;
                break;
+
+              default:
+                break;
              }
          printf (",");
          column++;
@@ -677,7 +690,7 @@ recode_format_table (RECODE_REQUEST request,
              printf ("\t");
              column += 8 - column % 8;
            }
-         printf ("%s%3d%s", start_comment, counter, end_comment);
+         printf ("%s%3u%s", start_comment, counter, end_comment);
        }
       switch (header_language)
        {
@@ -691,6 +704,9 @@ recode_format_table (RECODE_REQUEST request,
        case RECODE_LANGUAGE_PERL:
          printf ("  );\n");
          break;
+
+        default:
+          break;
        }
     }
   else
index dad38c0312292e1e79674574eabe39f95281d261..7c6c2dcb23bc551a27833ce296a8b7f81f83133b 100644 (file)
@@ -557,7 +557,7 @@ extern "C" {
 /* recode.c.  */
 
 #define ALLOC_SIZE(Variable, Size, Type) \
-  (Variable = (Type *) recode_malloc (outer, (Size)), Variable)
+  (Variable = (Type *) recode_malloc (outer, (Size)))
 
 #define ALLOC(Variable, Count, Type) \
   ALLOC_SIZE (Variable, (Count) * sizeof (Type), Type)
@@ -639,6 +639,8 @@ void recode_freeze_tables (RECODE_OUTER);
 /* iconv.c.  */
 
 bool transform_with_iconv (RECODE_SUBTASK);
+bool module_iconv (struct recode_outer *);
+void delmodule_iconv (struct recode_outer *);
 
 /* names.c.  */
 
index 9c8e46b6900e63dc115e08fdb06edbe710f78f13..7cad952cb4db2aff788b34a092fe5951dac944d4 100644 (file)
@@ -219,7 +219,7 @@ add_to_sequence (RECODE_REQUEST request, RECODE_SINGLE single,
   RECODE_OUTER outer = request->outer;
   RECODE_STEP step;
 
-  if (request->sequence_length == request->sequence_allocated)
+  if ((unsigned)request->sequence_length == request->sequence_allocated)
     {
       if (request->sequence_allocated == 0)
        request->sequence_allocated = 16;
index e80c146ed47f37d23d962082858e3ef995be2402..704cd292922c36e66977c52ca8b964065465e8b1 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 #include "rfc1345.h"
 
 /* This module takes care only of short RFC 1345 forms.  Module charname.c
@@ -28,7 +29,7 @@
 | NULL if this value has no such known short form.                     |
 `----------------------------------------------------------------------*/
 
-const char *
+_GL_ATTRIBUTE_PURE const char *
 ucs2_to_rfc1345 (recode_ucs2 code)
 {
   int first = 0;
@@ -55,7 +56,7 @@ ucs2_to_rfc1345 (recode_ucs2 code)
 | MASK (16) if the short form is unknown.                              |
 `---------------------------------------------------------------------*/
 
-static recode_ucs2
+static _GL_ATTRIBUTE_PURE recode_ucs2
 rfc1345_to_ucs2 (const char *string)
 {
   int first = 0;
@@ -98,7 +99,7 @@ transform_ucs2_rfc1345 (RECODE_SUBTASK subtask)
 
   while (get_ucs2 (&value, subtask))
     if (IS_ASCII (value))
-      if (value == intro)
+      if (value == (unsigned)intro)
        {
          put_byte (intro, subtask);
          put_byte (intro, subtask);
@@ -229,7 +230,7 @@ transform_rfc1345_ucs2 (RECODE_SUBTASK subtask)
 static bool
 init_rfc1345 (RECODE_CONST_REQUEST request,
              RECODE_STEP step,
-             RECODE_CONST_OPTION_LIST options)
+             RECODE_CONST_OPTION_LIST options _GL_UNUSED_PARAMETER)
 {
   RECODE_OUTER outer = request->outer;
   struct local *local;
@@ -286,7 +287,7 @@ module_rfc1345 (RECODE_OUTER outer)
     && declare_alias (outer, "mnemonic", "RFC1345");
 }
 
-void
-delmodule_rfc1345 (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_rfc1345 (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index 5c3c866f437677b234c341f15d0d3cddff4a7ab9..52fdbd0f11dab79c031b672df80b5eb063cc9cbb 100644 (file)
@@ -228,7 +228,7 @@ perform_memory_sequence (RECODE_TASK task)
   /* Execute one pass for each step of the sequence.  */
 
   for (sequence_index = 0;
-       sequence_index < request->sequence_length
+       sequence_index < (unsigned)request->sequence_length
         && task->error_so_far < task->abort_level;
        sequence_index++)
     {
@@ -259,7 +259,7 @@ perform_memory_sequence (RECODE_TASK task)
 
       /* Select the output text for this step.  */
 
-      if (sequence_index < request->sequence_length - 1)
+      if (sequence_index < (unsigned)request->sequence_length - 1)
        {
          subtask->output = output;
          subtask->output.cursor = subtask->output.buffer;
@@ -305,7 +305,7 @@ perform_memory_sequence (RECODE_TASK task)
 
       task->swap_input = RECODE_SWAP_UNDECIDED;
 
-      if (sequence_index < request->sequence_length - 1)
+      if (sequence_index < (unsigned)request->sequence_length - 1)
        {
          output = input;
          input = subtask->output;
@@ -357,7 +357,7 @@ perform_pass_sequence (RECODE_TASK task)
   /* Execute one pass for each step of the sequence.  */
 
   for (sequence_index = 0;
-       sequence_index < request->sequence_length
+       sequence_index < (unsigned)request->sequence_length
         && task->error_so_far < task->abort_level;
        sequence_index++)
     {
@@ -391,7 +391,7 @@ perform_pass_sequence (RECODE_TASK task)
 
       /* Select the output text for this step.  */
 
-      if (sequence_index < request->sequence_length - 1)
+      if (sequence_index < (unsigned)request->sequence_length - 1)
        {
          subtask->output = output;
 
@@ -448,7 +448,7 @@ perform_pass_sequence (RECODE_TASK task)
 
       task->swap_input = RECODE_SWAP_UNDECIDED;
 
-      if (sequence_index < request->sequence_length - 1)
+      if (sequence_index < (unsigned)request->sequence_length - 1)
        {
          output = input;
          input = subtask->output;
@@ -553,7 +553,7 @@ perform_pipe_sequence (RECODE_TASK task)
          (*step->transform_routine) (subtask);
 
          fclose (subtask->input.file);
-         if (sequence_index < request->sequence_length - 1
+         if (sequence_index < (unsigned)request->sequence_length - 1
              || *subtask->output.name)
            fclose (subtask->output.file);
 
index 7d822003949a76343d9fca806222aa2a43814304..dc41ef6649963fad8d522ee4b7d2b9dbbc1b3971 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 #include "hash.h"
 
 /*------------------------.
@@ -86,7 +87,7 @@ test15_data (RECODE_SUBTASK subtask)
       }
 
   /* Copy the rest verbatim.  */
-  while (value = get_byte (subtask), value != EOF)
+  while (value = get_byte (subtask), value != (unsigned)EOF)
     put_byte (value, subtask);
 
   SUBTASK_RETURN (subtask);
@@ -102,7 +103,7 @@ test16_data (RECODE_SUBTASK subtask)
     put_ucs2 (counter, subtask);
 
   /* Copy the rest verbatim.  */
-  while (value = get_byte (subtask), value != EOF)
+  while (value = get_byte (subtask), value != (unsigned)EOF)
     put_byte (value, subtask);
 
   SUBTASK_RETURN (subtask);
@@ -232,7 +233,7 @@ produce_count (RECODE_SUBTASK subtask)
     for (cursor = array; cursor < array + size; cursor++)
       if ((*cursor)->count > maximum_count)
        maximum_count = (*cursor)->count;
-    sprintf (buffer, "%d", maximum_count);
+    sprintf (buffer, "%u", maximum_count);
     count_width = strlen (buffer);
 
     for (cursor = array; cursor < array + size; cursor++)
@@ -253,7 +254,7 @@ produce_count (RECODE_SUBTASK subtask)
              delayed--;
            }
 
-       sprintf (buffer, "%*d  %.4X", count_width, (*cursor)->count, character);
+       sprintf (buffer, "%*u  %.4X", (int)count_width, (*cursor)->count, character);
         put_string (buffer, subtask);
        if (mnemonic)
          {
@@ -394,7 +395,7 @@ module_testdump (RECODE_OUTER outer)
   return true;
 }
 
-void
-delmodule_testdump (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_testdump (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index 1170491bc1e5f0bbf77bf8b9bf633c91abd81cc3..5b0919db58c370f9b3dffce18ecbf34266ef578c 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 static const unsigned short texinfo_data[] =
   {
@@ -83,7 +84,7 @@ module_texinfo (RECODE_OUTER outer)
     && declare_alias (outer, "ti", "Texinfo");
 }
 
-void
-delmodule_texinfo (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_texinfo (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index 34e42b035183f2608026b02ea777a90f3117c567..be73ecf2ae900420497550ae7c97bddf56e315ac 100644 (file)
--- a/src/ucs.c
+++ b/src/ucs.c
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 /* Description of some UCS-2 combinings.  */
 
@@ -452,6 +453,9 @@ get_ucs2 (unsigned *value, RECODE_SUBTASK subtask)
              return true;
            }
          break;
+
+        default:
+          break;
        }
     }
 }
@@ -621,7 +625,7 @@ module_ucs (RECODE_OUTER outer)
     && declare_alias (outer, "co", "combined-UCS-2");
 }
 
-void
-delmodule_ucs (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_ucs (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index e7f388465b692b60dabdd9f893c966a429557694..9a21632a0a48e03005fcf9406eb4648d464e187b 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 static bool
 transform_ucs4_utf16 (RECODE_SUBTASK subtask)
@@ -210,7 +211,7 @@ module_utf16 (RECODE_OUTER outer)
     && declare_alias (outer, "u6", "UTF-16");
 }
 
-void
-delmodule_utf16 (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_utf16 (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index 6a12222ac9d3af910f64baccd7877924371afece..e9d7aa39dd43851d096a46ffac2cec9fc8ef0ba3 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 #include "base64.h"
 
 /* Classification of first 128 UCS-2 characters.  */
@@ -39,10 +40,6 @@ static char classification[128] =
 };
 #undef z
 
-/* Should the character be directly represented in message headers?  */
-#define IS_HEADER_DIRECT(Character) \
-  (IS_ASCII (Character) && classification[Character] & (D | W))
-
 /* Should the character be directly represented in message bodies?
    Here, & (D | O | W) is implied, since these are the only flags.  */
 #define IS_BODY_DIRECT(Character) \
@@ -296,7 +293,7 @@ module_utf7 (RECODE_OUTER outer)
                       NULL, transform_utf16_utf7);
 }
 
-void
-delmodule_utf7 (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_utf7 (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index 41d136debaa58391d03e046fc6278cf3e4b21f2a..389c70433d835bc82c57e0bbb614009f4d216799 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 /* Define HANDLE_32_BITS if you want conversion for 2^32 codes instead
    of 2^31.  But this would not be ISO-10646, which says 2^31.  */
@@ -270,7 +271,7 @@ module_utf8 (RECODE_OUTER outer)
                       NULL, transform_ucs2_utf8);
 }
 
-void
-delmodule_utf8 (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_utf8 (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index 02a5cbd61749348e8570476aa84e7853841db71a..adef2195b8057e51c9b2015bf964feb2e9e7a79d 100644 (file)
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 /* This file contains various temporary tables.  These would ideally all go
    away once Keld will be given references, solid enough, to really integrate
@@ -594,7 +595,7 @@ module_varia (RECODE_OUTER outer)
   return true;
 }
 
-void
-delmodule_varia (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_varia (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index 684fc948d54d5db40993f016c4ce9eac9e9e4d9e..35892fcdab20e2a064033979be6e8f0a25fe5cb1 100644 (file)
--- a/src/vn.c
+++ b/src/vn.c
@@ -18,6 +18,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "common.h"
+#include "decsteps.h"
 
 static const recode_ucs2 tcvn_pool[256] =
   {
@@ -454,7 +455,7 @@ module_vietnamese (RECODE_OUTER outer)
   return true;
 }
 
-void
-delmodule_vietnamese (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_vietnamese (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
 {
 }
index 10e39d0f2cd63929996b8a6c9715681515ea40cf..6ca74bc9204d941f4ad195b53837f6234fb6c388 100755 (executable)
--- a/tables.py
+++ b/tables.py
@@ -443,8 +443,8 @@ class Explodes(Options):
               '  return true;\n'
               '}\n'
               '\n'
-              'void\n'
-              'delmodule_explodes (struct recode_outer *outer)\n'
+              '_GL_ATTRIBUTE_CONST void\n'
+              'delmodule_explodes (struct recode_outer *outer _GL_UNUSED_PARAMETER)\n'
               '{\n'
               '}\n')
 \f
@@ -736,7 +736,8 @@ class Strips(Options):
             self.write_data = Output(self.DATA).write
             write = self.write_data
             write('\n'
-                  '#include \"common.h\"\n')
+                  '#include "common.h"\n'
+                  '#include "decsteps.h"\n')
 
     # Read the text of RFC 1345, saving all charsets it declares.
     # UCS-2 mnemonics files should have been read in already.
@@ -1059,8 +1060,8 @@ class Strips(Options):
         sys.stdout.write("Completing %s\n" % self.DATA)
         write = self.write_data
         write('\n'
-              'bool\n'
-              'module_strips (struct recode_outer *outer)\n'
+              '_GL_ATTRIBUTE_CONST bool\n'
+              'module_strips (struct recode_outer *outer _GL_UNUSED_PARAMETER)\n'
               '{\n'
               '  RECODE_ALIAS alias;\n'
               '\n')
@@ -1092,8 +1093,8 @@ class Strips(Options):
               '  return true;\n'
               '}\n'
               '\n'
-              'void\n'
-              'delmodule_strips (struct recode_outer *outer)\n'
+              '_GL_ATTRIBUTE_CONST void\n'
+              'delmodule_strips (struct recode_outer *outer _GL_UNUSED_PARAMETER)\n'
               '{\n'
               '}\n')