[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 04/25] syntax-check: fix violations and re-enable sc_cast_of_
From: |
Charles Wilson |
Subject: |
Re: [PATCH 04/25] syntax-check: fix violations and re-enable sc_cast_of_x_alloc_return_value. |
Date: |
Tue, 15 Nov 2011 11:43:43 -0500 |
User-agent: |
Mozilla/5.0 (Windows NT 5.2; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 |
On 11/15/2011 11:36 AM, Charles Wilson wrote:
> On 11/15/2011 7:53 AM, Gary V. Vaughan wrote:
>> * cfg.mk (local-checks-to-fix): Remove
>> sc_cast_of_x_alloc_return_value from list of disabled checks.
>> * libltdl/config/ltmain.m4sh (XMALLOC, XFREE): Unroll into their
>> xmalloc and free expansions so that this syntax-check can find
>> violations, and then fix them.
>> * iibltdl/libltdl/lt__alloc.h (MALLOC, REALLOC): Renamed to
>> xmalloc and xrealloc so that this syntax-check can find
>> violations. Adjust all callers.
>> (FREE, MEMREASSIGN): Removed. All callers unrolled into their
>> former expansions, and violations of this syntax-check fixed.
>> * libltdl/loaders/loadlibrary.c (LOCALFREE): Unrolled for
>> consistency.
>
> Why do I get the feeling that the next time I try to build any .exe on
> cygwin/mingw with -Wall -Werror, I'm going to fail because all these
> (now removed) casts in the cwrapper source code were there specifically
> to suppress warnings...
And speaking of casts and C/C++...suppose you have package "foo" and you
want to build "foo" with CC=g++ -- that ought to be legal, right?
<pathto>/foo-src/configure --prefix=... CC=g++
But that means on cygwin/mingw, if foo uses libtool then the cwrapper
will be built using ${CC} -- that is, g++. Bang; you're dead -- because
the cast is required with C++, isn't it? (IIRC it's not just a warning,
it's an error, if the cast is missing).
--
Chuck
- [PATCH 01/25] syntax-check: skip sc_unmarked_diagnostics., Gary V. Vaughan, 2011/11/15
- [PATCH 06/25] syntax-check: fix violations and re-enable sc_file_system., Gary V. Vaughan, 2011/11/15
- [PATCH 07/25] syntax-check: fix violations and re-enable sc_m4_quote_check., Gary V. Vaughan, 2011/11/15
- [PATCH 08/25] syntax-check: fix violations and re-enable sc_makefile_TAB_only_indentation., Gary V. Vaughan, 2011/11/15
- [PATCH 10/25] syntax-check: fix violations and re-enable sc_prohibit_cvs_keyword., Gary V. Vaughan, 2011/11/15
- [PATCH 09/25] syntax-check: fix violations and re-enable sc_makefile_at_at_check., Gary V. Vaughan, 2011/11/15