From: David Levine Date: Wed, 30 Dec 2009 01:42:45 +0000 (+0000) Subject: * uip/mhlistsbr.c, uip/mhlsbr.c, uip/picksbr.c: cast X-Git-Tag: PRE_POSIX_CONVERSION~5 X-Git-Url: http://git.marmaro.de/?p=mmh;a=commitdiff_plain;h=d8916ff5d389de5ab225cd6f40aeda1b285d0f28 * uip/mhlistsbr.c, uip/mhlsbr.c, uip/picksbr.c: cast pointers to unsigned long before casting to unsigned int to avoid warnings on 64-bit about casting from pointer to int of different size. --- diff --git a/ChangeLog b/ChangeLog index a0528eb..38ba7e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-12-29 David Levine + * uip/mhlistsbr.c, uip/mhlsbr.c, uip/picksbr.c: cast + pointers to unsigned long before casting to unsigned int + to avoid warnings on 64-bit about casting from pointer + to int of different size. + * uip/new.c: cast folder_len to int to avoid warning on 64-bit about passing a size_t to an int conversion specifier. diff --git a/uip/mhlistsbr.c b/uip/mhlistsbr.c index 10ec55d..1a02629 100644 --- a/uip/mhlistsbr.c +++ b/uip/mhlistsbr.c @@ -263,7 +263,8 @@ list_debug (CT ct) /* print internal flags for type/subtype */ fprintf (stderr, " type 0x%x subtype 0x%x params 0x%x\n", - ct->c_type, ct->c_subtype, (unsigned int) ct->c_ctparams); + ct->c_type, ct->c_subtype, + (unsigned int)(unsigned long) ct->c_ctparams); fprintf (stderr, " showproc \"%s\"\n", empty (ct->c_showproc)); fprintf (stderr, " termproc \"%s\"\n", empty (ct->c_termproc)); @@ -275,7 +276,7 @@ list_debug (CT ct) /* print internal flags for transfer encoding */ fprintf (stderr, " transfer encoding 0x%x params 0x%x\n", - ct->c_encoding, (unsigned int) ct->c_cefile); + ct->c_encoding, (unsigned int)(unsigned long) ct->c_cefile); /* print Content-ID */ if (ct->c_id) @@ -286,7 +287,7 @@ list_debug (CT ct) fprintf (stderr, " %s:%s", DESCR_FIELD, ct->c_descr); fprintf (stderr, " read fp 0x%x file \"%s\" begin %ld end %ld\n", - (unsigned int) ct->c_fp, empty (ct->c_file), + (unsigned int)(unsigned long) ct->c_fp, empty (ct->c_file), ct->c_begin, ct->c_end); /* print more information about transfer encoding */ @@ -425,7 +426,8 @@ list_encoding (CT ct) if ((ce = ct->c_cefile)) fprintf (stderr, " decoded fp 0x%x file \"%s\"\n", - (unsigned int) ce->ce_fp, ce->ce_file ? ce->ce_file : ""); + (unsigned int)(unsigned long) ce->ce_fp, + ce->ce_file ? ce->ce_file : ""); return OK; } diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index 9f1ebdd..420dbb6 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -619,7 +619,8 @@ mhl_format (char *file, int length, int width) fprintf (stderr, "c1: name=\"%s\" text=\"%s\" ovtxt=\"%s\"\n", c1->c_name, c1->c_text, c1->c_ovtxt); fprintf (stderr, "\tnfs=0x%x fmt=0x%x\n", - (unsigned int) c1->c_nfs, (unsigned int) c1->c_fmt); + (unsigned int)(unsigned long) c1->c_nfs, + (unsigned int)(unsigned long) c1->c_fmt); fprintf (stderr, "\toffset=%d ovoff=%d width=%d cwidth=%d length=%d\n", c1->c_offset, c1->c_ovoff, c1->c_width, c1->c_cwidth, c1->c_length); diff --git a/uip/picksbr.c b/uip/picksbr.c index 1e16795..61d5afb 100644 --- a/uip/picksbr.c +++ b/uip/picksbr.c @@ -538,7 +538,8 @@ PRaction (struct nexus *n, int level) dasctime (&n->n_tws, TW_NULL)); return; } - fprintf (stderr, "UNKNOWN(0x%x)\n", (unsigned int) (*n->n_action)); + fprintf (stderr, "UNKNOWN(0x%x)\n", + (unsigned int)(unsigned long) (*n->n_action)); }