summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-18 17:15:24 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-18 17:15:24 +0000
commit796d0c11816d6cbd743d700854f6d41dee56bd51 (patch)
tree05a0131f263aea2265592c2815f69a78893d60d0
parent86f9ba21326353dd3cac3586e17739779575b823 (diff)
enable compiler warnings for bibtex8
towards fixing the signed/unsigned char problem git-svn-id: svn://tug.org/texlive/trunk@13818 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/bibtex8/ChangeLog11
-rw-r--r--Build/source/texk/bibtex8/Makefile.am2
-rw-r--r--Build/source/texk/bibtex8/Makefile.in1
-rw-r--r--Build/source/texk/bibtex8/bibtex-1.c1
-rw-r--r--Build/source/texk/bibtex8/bibtex-2.c1
-rw-r--r--Build/source/texk/bibtex8/bibtex-3.c2
-rw-r--r--Build/source/texk/bibtex8/bibtex-4.c1
-rw-r--r--Build/source/texk/bibtex8/bibtex.c1
-rw-r--r--Build/source/texk/bibtex8/datatype.h6
-rw-r--r--Build/source/texk/bibtex8/gblvars.h6
-rw-r--r--Build/source/texk/bibtex8/utils.c3
11 files changed, 23 insertions, 12 deletions
diff --git a/Build/source/texk/bibtex8/ChangeLog b/Build/source/texk/bibtex8/ChangeLog
index 8343e9f0789..be3cfba4401 100644
--- a/Build/source/texk/bibtex8/ChangeLog
+++ b/Build/source/texk/bibtex8/ChangeLog
@@ -1,3 +1,14 @@
+2009-06-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (AM_CFLAGS): enable compiler warnings.
+ * bibtex-3.c (str_lookup): silence 'used uninitialized' warning.
+ * datatype.h, gblvars.h: in various places replace Integer8_T
+ (i.e., char) by UChar_T (i.e., unsigned char).
+ * utils.c (c8read_csf): avoid unused variable.
+ * remove rcsid's.
+
+ * FIXME: still needs careful checking for signed/unsigned char.
+
2009-06-04 Karl Berry <karl@tug.org>
* Makefile.am (AM_CPPFLAGS): move -funsigned-char here,
diff --git a/Build/source/texk/bibtex8/Makefile.am b/Build/source/texk/bibtex8/Makefile.am
index 6da1721a524..6e82fc8263f 100644
--- a/Build/source/texk/bibtex8/Makefile.am
+++ b/Build/source/texk/bibtex8/Makefile.am
@@ -7,6 +7,8 @@ ACLOCAL_AMFLAGS = -I ../../m4
INCLUDES = $(KPATHSEA_INCLUDES)
AM_CPPFLAGS = -DUNIX -DKPATHSEA -DSUPPORT_8BIT
+AM_CFLAGS = $(WARNING_CFLAGS)
+
## FIXME: (1) this should go away once the code has been carefully
## FIXME: analyzed and uses 'unsigned char' where necessary.
## FIXME: (2) this should go to AM_CFLAGS, but AIX xlc only
diff --git a/Build/source/texk/bibtex8/Makefile.in b/Build/source/texk/bibtex8/Makefile.in
index 6a6174310c2..3c60f363f5c 100644
--- a/Build/source/texk/bibtex8/Makefile.in
+++ b/Build/source/texk/bibtex8/Makefile.in
@@ -245,6 +245,7 @@ top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I ../../m4
INCLUDES = $(KPATHSEA_INCLUDES)
AM_CPPFLAGS = -DUNIX -DKPATHSEA -DSUPPORT_8BIT -funsigned-char
+AM_CFLAGS = $(WARNING_CFLAGS)
bibtex8_SOURCES = \
bibtex-1.c \
bibtex-2.c \
diff --git a/Build/source/texk/bibtex8/bibtex-1.c b/Build/source/texk/bibtex8/bibtex-1.c
index 5b4af6a0f2d..bb20a3fb579 100644
--- a/Build/source/texk/bibtex8/bibtex-1.c
+++ b/Build/source/texk/bibtex8/bibtex-1.c
@@ -134,7 +134,6 @@
******************************************************************************
******************************************************************************
*/
-static char *rcsid = "$Id: bibtex-1.c,v 3.71 1996/08/18 20:47:30 kempson Exp $";
#include "sysdep.h"
#include "bibtex.h"
diff --git a/Build/source/texk/bibtex8/bibtex-2.c b/Build/source/texk/bibtex8/bibtex-2.c
index 082243f92ff..487277e9915 100644
--- a/Build/source/texk/bibtex8/bibtex-2.c
+++ b/Build/source/texk/bibtex8/bibtex-2.c
@@ -130,7 +130,6 @@
******************************************************************************
******************************************************************************
*/
-static char *rcsid = "$Id: bibtex-2.c,v 3.71 1996/08/18 20:47:30 kempson Exp $";
#include "sysdep.h"
#include "bibtex.h"
diff --git a/Build/source/texk/bibtex8/bibtex-3.c b/Build/source/texk/bibtex8/bibtex-3.c
index 33c30e8143e..74838d5dad6 100644
--- a/Build/source/texk/bibtex8/bibtex-3.c
+++ b/Build/source/texk/bibtex8/bibtex-3.c
@@ -131,7 +131,6 @@
******************************************************************************
******************************************************************************
*/
-static char *rcsid = "$Id: bibtex-3.c,v 3.71 1996/08/18 20:37:06 kempson Exp $";
#include "sysdep.h"
#include "bibtex.h"
@@ -2503,6 +2502,7 @@ BEGIN
p = h + HASH_BASE;
hash_found = FALSE;
old_string = FALSE;
+ str_num = 0; /* avoid uninitialized warning */
LOOP
BEGIN
diff --git a/Build/source/texk/bibtex8/bibtex-4.c b/Build/source/texk/bibtex8/bibtex-4.c
index 4186ec7f285..fed22bc919d 100644
--- a/Build/source/texk/bibtex8/bibtex-4.c
+++ b/Build/source/texk/bibtex8/bibtex-4.c
@@ -122,7 +122,6 @@
******************************************************************************
******************************************************************************
*/
-static char *rcsid = "$Id: bibtex-4.c,v 3.71 1996/08/18 20:47:30 kempson Exp $";
#include "sysdep.h"
#include "bibtex.h"
diff --git a/Build/source/texk/bibtex8/bibtex.c b/Build/source/texk/bibtex8/bibtex.c
index a6305b24672..192120818b6 100644
--- a/Build/source/texk/bibtex8/bibtex.c
+++ b/Build/source/texk/bibtex8/bibtex.c
@@ -95,7 +95,6 @@
******************************************************************************
******************************************************************************
*/
-static char *rcsid = "$Id: bibtex.c,v 3.71 1996/08/18 20:37:06 kempson Exp $";
#define __BIBTEX_C__
diff --git a/Build/source/texk/bibtex8/datatype.h b/Build/source/texk/bibtex8/datatype.h
index 26fc9254c05..dca766ee18f 100644
--- a/Build/source/texk/bibtex8/datatype.h
+++ b/Build/source/texk/bibtex8/datatype.h
@@ -141,7 +141,7 @@ typedef long Integer_T;
** data types used in the BibTeX WEB source.
**============================================================================
*/
-typedef Integer8_T ASCIICode_T;
+typedef UChar_T ASCIICode_T;
typedef File_ptr AlphaFile_T;
typedef Integer16_T AuxNumber_T;
typedef Integer16_T BibNumber_T;
@@ -165,9 +165,9 @@ typedef Integer8_T IDType_T;
typedef Integer16_T IntEntLoc_T;
typedef Integer8_T LexType_T;
typedef Integer16_T LitStkLoc_T;
-typedef Integer8_T PdsLen_T;
+typedef UChar_T PdsLen_T;
typedef Integer8_T PdsLoc_T;
-typedef Char_T PdsType_T[FILE_NAME_SIZE + 1];
+typedef UChar_T PdsType_T[FILE_NAME_SIZE + 1];
typedef Unsigned16_T PoolPointer_T;
typedef Integer8_T StkType_T;
typedef Integer16_T StrEntLoc_T;
diff --git a/Build/source/texk/bibtex8/gblvars.h b/Build/source/texk/bibtex8/gblvars.h
index 7939a3cf80c..d28672e530c 100644
--- a/Build/source/texk/bibtex8/gblvars.h
+++ b/Build/source/texk/bibtex8/gblvars.h
@@ -316,7 +316,7 @@ __EXTERN__ Boolean_T store_entry;
__EXTERN__ Boolean_T store_field;
__EXTERN__ Boolean_T store_token;
__EXTERN__ StrEntLoc_T str_ent_ptr;
-__EXTERN__ Integer8_T str_glb_ptr;
+__EXTERN__ UChar_T str_glb_ptr;
__EXTERN__ Integer_T string_width;
__EXTERN__ StrNumber_T str_num;
__EXTERN__ StrNumber_T str_ptr;
@@ -368,9 +368,9 @@ __EXTERN__ Integer_T lit_stack[LIT_STK_SIZE + 1];
__EXTERN__ StkType_T lit_stk_type[LIT_STK_SIZE + 1];
__EXTERN__ ASCIICode_T name_sep_char[BUF_SIZE + 1];
__EXTERN__ BufPointer_T name_tok[BUF_SIZE + 1];
-__EXTERN__ char name_of_file[FILE_NAME_SIZE + 1];
+__EXTERN__ unsigned char name_of_file[FILE_NAME_SIZE + 1];
__EXTERN__ StrNumber_T s_preamble[MAX_BIB_FILES + 1];
-__EXTERN__ char xchr[LAST_ASCII_CHAR + 1];
+__EXTERN__ unsigned char xchr[LAST_ASCII_CHAR + 1];
__EXTERN__ ASCIICode_T xord[LAST_TEXT_CHAR + 1];
#ifdef SUPPORT_8BIT
diff --git a/Build/source/texk/bibtex8/utils.c b/Build/source/texk/bibtex8/utils.c
index 8c11e614137..dc9b801aaac 100644
--- a/Build/source/texk/bibtex8/utils.c
+++ b/Build/source/texk/bibtex8/utils.c
@@ -118,7 +118,6 @@
******************************************************************************
******************************************************************************
*/
-static char *rcsid = "$Id: utils.c,v 3.71 1996/08/18 20:37:06 kempson Exp $";
#include <stdarg.h>
#ifdef WIN32
@@ -1573,7 +1572,9 @@ int c8read_csf (void)
int c, i;
int in_comment;
char sx[BUF_SIZE + 1];
+#ifndef KPATHSEA
char *value;
+#endif
/*
** Construct the name of the CS file to be used: