Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: [PATCH] Fix compiler warning on 64-bit machines. (PR#1
Home

[Freeciv-Dev] Re: [PATCH] Fix compiler warning on 64-bit machines. (PR#1

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gaute B Strokkenes <gs234@xxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] Fix compiler warning on 64-bit machines. (PR#1037)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 30 Oct 2001 11:11:48 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Mon, Oct 29, 2001 at 05:28:03PM -0800, Gaute B Strokkenes wrote:
> Index: savegame.c
> ===================================================================
> RCS file: /home/freeciv/CVS/freeciv/server/savegame.c,v
> retrieving revision 1.37
> diff -u -r1.37 savegame.c
> --- savegame.c        2001/10/26 07:33:24     1.37
> +++ savegame.c        2001/10/30 01:26:17
> @@ -1045,7 +1045,8 @@
>    }
>  
>    if (section_file_lookup(file, "player%d.attribute_block_length", plrno)) {
> -    int raw_length1, raw_length2, part_nr, parts,quoted_length;
> +    int raw_length1, raw_length2, part_nr, parts;
> +    size_t quoted_length;
>      char *quoted;
>  
>      raw_length1 =
> @@ -1071,15 +1072,17 @@
>                                        plrno, part_nr);
>        if (!current)
>       break;
> -      freelog(LOG_DEBUG,"quoted_length=%d quoted=%d current=%d",
> -           quoted_length,    
> -           strlen(quoted),strlen(current));
> +      freelog(LOG_DEBUG, "quoted_length=%lu quoted=%lu current=%lu",
> +           (unsigned long) quoted_length,
> +           (unsigend long) strlen(quoted),
> +           (unsigned long) strlen(current));
>        assert(strlen(quoted) + strlen(current) <= quoted_length);
>        strcat(quoted, current);
>      }
>      if (quoted_length != strlen(quoted)) {
> -      freelog(LOG_NORMAL, "quoted_length=%d quoted=%d", quoted_length,
> -           strlen(quoted));
> +      freelog(LOG_NORMAL, "quoted_length=%lu quoted=%lu",
> +           (unsigned long) quoted_length,
> +           (unsigned long) strlen(quoted));
>        assert(0);
>      }

%d with an int doesn't work?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Like the ad says, at 300 dpi you can tell she's wearing a
  swimsuit. At 600 dpi you can tell it's wet. At 1200 dpi you
  can tell it's painted on. I suppose at 2400 dpi you can tell
  if the paint is giving her a rash."
    -- Joshua R. Poulson


[Prev in Thread] Current Thread [Next in Thread]