Re: [PATCH/RFC] Fix some warnings (on cygwin) to allow -Werror

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

 



Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxx> writes:

> Despite the subject line, this should be useful on any system for
> which uint32_t is defined to be unsigned long rather than
> unsigned int. (and where the return type of htonl() is similarly
> defined).

Correct.  Perhaps "Use %PRIu32 and such to print integers of fixed length"?

The only worry I have with this patch is with systems with not-so-ANSI
headers; as you noticed, we already have:

        #ifndef PRIuMAX
        #define PRIuMAX "llu"
        #endif

in git-compat-util.h, which does include <inttypes.h>, so PRIu32 and
friends could be problematic on these platforms.

> @@ -1718,7 +1720,8 @@ static int add_ref_tag(const char *path, const unsigned char *sha1, int flag, vo
>  static void prepare_pack(int window, int depth)
>  {
>  	struct object_entry **delta_list;
> -	uint32_t i, n, nr_deltas;
> +	uint32_t i, nr_deltas;
> +	unsigned n;

Hmm.  Is this change necessary?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux