[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: type cleanup
From: |
Sam Roberts |
Subject: |
Re: type cleanup |
Date: |
Mon, 11 Mar 2002 22:02:00 -0500 |
User-agent: |
Mutt/1.3.16i |
It's in my local tree, hopefully tonight.
Quoting Alain Magloire <address@hidden>, who wrote:
> >
> > Hi,
> >
> > I'm building gnu mailutils on an alpha running Tru64 unix,
> > using the vendor compiler. The compiler makes a lot of complaints
> > about wrong types, e.g. assigning pointer to integer, or
> > mixing signed/unsigned types.
> >
> > The following patch cleans up all of the ones that the compiler
> > complains about, with a couple of minor exceptions.
>
>
> My first emails bounced. This patch seems allright
> unfortunately I can not commit it. Sympatico(ISP)
> problems. Somebody with write access?
>
> >
> >
> > Index: argp/Makefile.am
> > ===================================================================
> > RCS file: /cvs/mailutils/argp/Makefile.am,v
> > retrieving revision 1.6
> > diff -u -b -B -r1.6 Makefile.am
> > --- argp/Makefile.am 20 Feb 2002 14:47:49 -0000 1.6
> > +++ argp/Makefile.am 6 Mar 2002 05:13:55 -0000
> > @@ -1,6 +1,6 @@
> > AUTOMAKE_OPTIONS = ../lib/ansi2knr
> >
> > -INCLUDES = -I${top_srcdir}/lib
> > +INCLUDES = -I${top_srcdir}/lib -I$(top_srcdir)/include
> >
> > noinst_LTLIBRARIES = @ARGPLIB@
> >
> > Index: argp/argp-parse.c
> > ===================================================================
> > RCS file: /cvs/mailutils/argp/argp-parse.c,v
> > retrieving revision 1.5
> > diff -u -b -B -r1.5 argp-parse.c
> > --- argp/argp-parse.c 14 Jan 2002 15:55:29 -0000 1.5
> > +++ argp/argp-parse.c 6 Mar 2002 05:13:59 -0000
> > @@ -32,6 +32,10 @@
> > # include <strings.h>
> > #endif
> >
> > +#if HAVE_ALLOCA_H
> > +# include <alloca.h>
> > +#endif
> > +
> > #ifndef _
> > /* This is for other GNU distributions with internationalized messages.
> > When compiling libc, the _ macro is predefined. */
> > Index: imap4d/copy.c
> > ===================================================================
> > RCS file: /cvs/mailutils/imap4d/copy.c,v
> > retrieving revision 1.10
> > diff -u -b -B -r1.10 copy.c
> > --- imap4d/copy.c 19 Feb 2002 17:06:49 -0000 1.10
> > +++ imap4d/copy.c 6 Mar 2002 05:13:59 -0000
> > @@ -52,7 +52,7 @@
> > const char *delim = "/";
> > char *sp = NULL;
> > size_t *set = NULL;
> > - size_t n = 0;
> > + int n = 0;
> > mailbox_t cmbox = NULL;
> >
> > msgset = util_getword (arg, &sp);
> > Index: imap4d/store.c
> > ===================================================================
> > RCS file: /cvs/mailutils/imap4d/store.c,v
> > retrieving revision 1.8
> > diff -u -b -B -r1.8 store.c
> > --- imap4d/store.c 28 May 2001 14:28:39 -0000 1.8
> > +++ imap4d/store.c 6 Mar 2002 05:13:59 -0000
> > @@ -43,7 +43,8 @@
> > char *sp = NULL;
> > int status;
> > int ack = 0;
> > - size_t i, n = 0;
> > + size_t i;
> > + int n = 0;
> > size_t *set = NULL;
> > enum value_type { STORE_SET, STORE_ADD, STORE_UNSET } how;
> >
> > Index: imap4d/util.c
> > ===================================================================
> > RCS file: /cvs/mailutils/imap4d/util.c,v
> > retrieving revision 1.32
> > diff -u -b -B -r1.32 util.c
> > --- imap4d/util.c 7 Feb 2002 16:02:05 -0000 1.32
> > +++ imap4d/util.c 6 Mar 2002 05:14:02 -0000
> > @@ -566,7 +566,7 @@
> > static int
> > add2set (size_t **set, int *n, unsigned long val)
> > {
> > - int *tmp;
> > + size_t *tmp;
> > tmp = realloc (*set, (*n + 1) * sizeof (**set));
> > if (tmp == NULL)
> > {
> > Index: lib/getopt.h
> > ===================================================================
> > RCS file: /cvs/mailutils/lib/getopt.h,v
> > retrieving revision 1.2
> > diff -u -b -B -r1.2 getopt.h
> > --- lib/getopt.h 16 Apr 2001 00:06:55 -0000 1.2
> > +++ lib/getopt.h 6 Mar 2002 05:14:02 -0000
> > @@ -82,11 +82,7 @@
> >
> > struct option
> > {
> > -# if defined __STDC__ && __STDC__
> > const char *name;
> > -# else
> > - char *name;
> > -# endif
> > /* has_arg can't be an enum because some compilers complain about
> > type mismatches in all the code that assumes it is an int. */
> > int has_arg;
> > Index: lib/mu_argp.c
> > ===================================================================
> > RCS file: /cvs/mailutils/lib/mu_argp.c,v
> > retrieving revision 1.6
> > diff -u -b -B -r1.6 mu_argp.c
> > --- lib/mu_argp.c 27 Feb 2002 11:54:47 -0000 1.6
> > +++ lib/mu_argp.c 6 Mar 2002 05:14:02 -0000
> > @@ -27,6 +27,7 @@
> > #endif
> > #include <argcv.h>
> > #include <mu_argp.h>
> > +#include <mailutils/mutil.h>
> > #ifdef HAVE_MYSQL
> > # include "../MySql/MySql.h"
> > #endif
> > Index: lib/strchrnul.c
> > ===================================================================
> > RCS file: /cvs/mailutils/lib/strchrnul.c,v
> > retrieving revision 1.1
> > diff -u -b -B -r1.1 strchrnul.c
> > --- lib/strchrnul.c 16 Apr 2001 00:13:35 -0000 1.1
> > +++ lib/strchrnul.c 6 Mar 2002 05:14:02 -0000
> > @@ -29,7 +29,7 @@
> > const char *s;
> > int c_in;
> > {
> > - const unsigned char *char_ptr;
> > + const char *char_ptr;
> > const unsigned long int *longword_ptr;
> > unsigned long int longword, magic_bits, charmask;
> > unsigned char c;
> > Index: mail/mail.c
> > ===================================================================
> > RCS file: /cvs/mailutils/mail/mail.c,v
> > retrieving revision 1.54
> > diff -u -b -B -r1.54 mail.c
> > --- mail/mail.c 27 Feb 2002 11:56:48 -0000 1.54
> > +++ mail/mail.c 6 Mar 2002 05:14:03 -0000
> > @@ -21,7 +21,7 @@
> > mailbox_t mbox;
> > unsigned int cursor;
> > unsigned int realcursor;
> > -unsigned int total;
> > +size_t total;
> > FILE *ofile;
> > int interactive;
> >
> > Index: mail/mail.h
> > ===================================================================
> > RCS file: /cvs/mailutils/mail/mail.h,v
> > retrieving revision 1.38
> > diff -u -b -B -r1.38 mail.h
> > --- mail/mail.h 28 Feb 2002 01:58:39 -0000 1.38
> > +++ mail/mail.h 6 Mar 2002 05:14:03 -0000
> > @@ -22,6 +22,10 @@
> > #include <config.h>
> > #endif
> >
> > +#if HAVE_ALLOCA_H
> > +# include <alloca.h>
> > +#endif
> > +
> > #ifdef DMALLOC
> > # include <dmalloc.h>
> > #endif
> > @@ -127,7 +131,7 @@
> > extern mailbox_t mbox;
> > extern unsigned int cursor;
> > extern unsigned int realcursor;
> > -extern unsigned int total;
> > +extern size_t total;
> > extern FILE *ofile;
> > extern int interactive;
> > extern const struct mail_command_entry mail_command_table[];
> > Index: mail/send.c
> > ===================================================================
> > RCS file: /cvs/mailutils/mail/send.c,v
> > retrieving revision 1.23
> > diff -u -b -B -r1.23 send.c
> > --- mail/send.c 21 Feb 2002 01:25:43 -0000 1.23
> > +++ mail/send.c 6 Mar 2002 05:14:03 -0000
> > @@ -254,7 +254,7 @@
> > else
> > {
> > char *buf = NULL;
> > - unsigned int n;
> > + size_t n;
> > rewind (env->file);
> > while (getline (&buf, &n, env->file) > 0)
> > fputs (buf, fp);
> > @@ -428,7 +428,7 @@
> > stream_t stream = NULL;
> > char buffer[512];
> > off_t off = 0;
> > - unsigned int n = 0;
> > + size_t n = 0;
> > message_get_stream (msg, &stream);
> > while (stream_read (stream, buffer, sizeof buffer - 1, off, &n) == 0
> > && n != 0)
> > Index: mail/size.c
> > ===================================================================
> > RCS file: /cvs/mailutils/mail/size.c,v
> > retrieving revision 1.5
> > diff -u -b -B -r1.5 size.c
> > --- mail/size.c 30 Jun 2001 09:33:34 -0000 1.5
> > +++ mail/size.c 6 Mar 2002 05:14:03 -0000
> > @@ -28,7 +28,7 @@
> > util_msglist_command (mail_size, argc, argv, 1);
> > else
> > {
> > - unsigned int s = 0;
> > + size_t s = 0;
> > message_t msg;
> > if (mailbox_get_message (mbox, cursor, &msg) != 0)
> > {
> > Index: mail/util.c
> > ===================================================================
> > RCS file: /cvs/mailutils/mail/util.c,v
> > retrieving revision 1.36
> > diff -u -b -B -r1.36 util.c
> > --- mail/util.c 21 Feb 2002 01:25:43 -0000 1.36
> > +++ mail/util.c 6 Mar 2002 05:14:03 -0000
> > @@ -832,7 +832,7 @@
> > for (i = 1; i < msgset->npart; i++)
> > {
> > message_t submsg = NULL;
> > - unsigned int nparts = 0;
> > + size_t nparts = 0;
> > char *type = NULL;
> > header_t hdr = NULL;
> >
> > Index: mailbox/filter_trans.c
> > ===================================================================
> > RCS file: /cvs/mailutils/mailbox/filter_trans.c,v
> > retrieving revision 1.3
> > diff -u -b -B -r1.3 filter_trans.c
> > --- mailbox/filter_trans.c 7 Feb 2002 07:58:55 -0000 1.3
> > +++ mailbox/filter_trans.c 6 Mar 2002 05:14:03 -0000
> > @@ -316,7 +316,7 @@
> > int pad = 0;
> > const char *b64 =
> > "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
> > - const unsigned char* ptr = iptr;
> > + const char* ptr = iptr;
> >
> > *nbytes = 0;
> > if (isize <= 3)
> > Index: mailbox/folder_imap.c
> > ===================================================================
> > RCS file: /cvs/mailutils/mailbox/folder_imap.c,v
> > retrieving revision 1.45
> > diff -u -b -B -r1.45 folder_imap.c
> > --- mailbox/folder_imap.c 27 Jan 2002 04:05:39 -0000 1.45
> > +++ mailbox/folder_imap.c 6 Mar 2002 05:14:04 -0000
> > @@ -1183,7 +1183,7 @@
> > }
> > else if ((status = imap_string (f_imap, &tok)) == 0)
> > {
> > - size_t sz = 0;
> > + off_t sz = 0;
> >
> > stream_size (f_imap->string.stream, &sz);
> > lr->name = calloc (sz + 1, 1);
> > Index: mailbox/sendmail.c
> > ===================================================================
> > RCS file: /cvs/mailutils/mailbox/sendmail.c,v
> > retrieving revision 1.13
> > diff -u -b -B -r1.13 sendmail.c
> > --- mailbox/sendmail.c 23 Jan 2002 04:37:19 -0000 1.13
> > +++ mailbox/sendmail.c 6 Mar 2002 05:14:04 -0000
> > @@ -258,7 +258,7 @@
> > else
> > {
> > int i = 1;
> > - int count = 0;
> > + size_t count = 0;
> >
> > address_get_count (to, &count);
> >
> > Index: mailbox/stream.c
> > ===================================================================
> > RCS file: /cvs/mailutils/mailbox/stream.c,v
> > retrieving revision 1.17
> > diff -u -b -B -r1.17 stream.c
> > --- mailbox/stream.c 16 Dec 2001 05:34:16 -0000 1.17
> > +++ mailbox/stream.c 6 Mar 2002 05:14:04 -0000
> > @@ -166,7 +166,7 @@
> > else
> > {
> > size_t residue = count;
> > - int r;
> > + size_t r;
> >
> > /* If the amount requested is bigger than the buffer cache size,
> > bypass it. Do no waste time and let it through. */
> > Index: mailbox/include/imap0.h
> > ===================================================================
> > RCS file: /cvs/mailutils/mailbox/include/imap0.h,v
> > retrieving revision 1.14
> > diff -u -b -B -r1.14 imap0.h
> > --- mailbox/include/imap0.h 27 Feb 2002 12:02:52 -0000 1.14
> > +++ mailbox/include/imap0.h 6 Mar 2002 05:14:04 -0000
> > @@ -144,7 +144,7 @@
> >
> > size_t seq; /* Sequence number to build a tag. */
> > char *capa; /* Cabilities of the server. */
> > - size_t flags;
> > + int flags;
> >
> > /* IO use to hold the literal and quoted strings send by
> > the IMAP server. */
> > Index: messages/messages.c
> > ===================================================================
> > RCS file: /cvs/mailutils/messages/messages.c,v
> > retrieving revision 1.6
> > diff -u -b -B -r1.6 messages.c
> > --- messages/messages.c 22 Feb 2002 13:18:37 -0000 1.6
> > +++ messages/messages.c 6 Mar 2002 05:14:04 -0000
> > @@ -90,7 +90,7 @@
> > {
> > mailbox_t mbox;
> > url_t url = NULL;
> > - int count;
> > + size_t count;
> >
> > if (mailbox_create_default (&mbox, box) != 0)
> > {
> >
> >
> >
> > _______________________________________________
> > Bug-mailutils mailing list
> > address@hidden
> > http://mail.gnu.org/mailman/listinfo/bug-mailutils
> >
>
>
> --
> au revoir, alain
> ----
> Aussi haut que l'on soit assis, on n'est toujours assis que sur son cul !!!
>
>
> _______________________________________________
> Bug-mailutils mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-mailutils
--
Sam Roberts <address@hidden> (Vivez sans temps mort!)