[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7203: [PATCH] sort: fix unportable conversion of unsigned char * ->
From: |
Jim Meyering |
Subject: |
bug#7203: [PATCH] sort: fix unportable conversion of unsigned char * -> char * |
Date: |
Tue, 19 Apr 2011 09:08:28 +0200 |
Paul Eggert wrote:
> This is another portability bug caught by the Sun C compiler.
> Without this patch, cc complains:
>
> "sort.c", line 3933: warning: assignment type mismatch:
> pointer to const char "=" pointer to unsigned char
>
>
> * src/sort.c (fold_toupper): Change this back from char to
> unsigned char, fixing a regression introduced in commit
> 59e2e55d0f154a388adc9bac37d2b45f2ba971f8 dated February 26, as the
> C Standard doesn't let you convert from unsigned char * to char *
> without a cast, and the (in theory more portable) style here is to
> convert char values, not pointer values.
> (getmonth): Convert char to unsigned char when needed for
> comparison.
Thanks again.
The patch went in months ago, so I'm closing this.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#7203: [PATCH] sort: fix unportable conversion of unsigned char * -> char *,
Jim Meyering <=