[splint-discuss] newbie questions.
David Evans
evans at cs.virginia.edu
Fri Apr 18 10:05:46 EDT 2003
Is there a #define PermMem_realloc somewhere?
The preprocessing error seems to indicate there is, but the code is
declaring PerlMem_realloc inside the define's.
As a workaround, you can use
#ifndef S_SPLINT_S
...
#endif
around the problem code to avoid splint processing it.
--- Dave
On Thu, 17 Apr 2003, Jim Cromie wrote:
> Hi all,
>
> Ive just submitted a patch to perl5 makefile to add a splint target,
> its mostly borrowed from perl6; Im not pretending to know what Im doing.
>
> Im seeking advice on the 1st problem detected,
> it appears to be an issue of not picking up various #defines.
>
>
> < more preprocessing ... >
> < more preprocessing .. >
> util.c:93:31: macro `PerlMem_realloc' used without args
> < more preprocessing . >
> Preprocessing error for file: /home/jimc/bleadperl/util.c
> *** Cannot continue.
> < cleaning .......... >
> make: *** [splint] Error 1
>
>
> and the offending code.
>
> 87 Malloc_t
> 88 Perl_safesysrealloc(Malloc_t where,MEM_SIZE size)
> 89 {
> 90 dTHX;
> 91 Malloc_t ptr;
> 92 #if !defined(STANDARD_C) && !defined(HAS_REALLOC_PROTOTYPE) &&
> !defined(PERL_MICRO)
> 93 Malloc_t PerlMem_realloc();
> 94 #endif /* !defined(STANDARD_C) && !defined(HAS_REALLOC_PROTOTYPE) */
> 95
>
>
> there are a number of #defines on 92 which protect the code, it seems
> apriori that theyre not observed by splint, which then gives up.
>
>
>
>
> splintflags = -weak +showscan +showsummary +posixstrictlib -abstract
> +aliasunique +ansireserved +ansireservedinternal +assignexpose
> +bitwisesigned +boolcompare +booltype BOOLVAL +casebreak -castfcnptr
> -charint +continuecomment +controlnestdepth 15 +cppnames +declundef
> +distinctinternalnames +evalorder +fielduse +forcehints -globs +imptype
> +includenest 8 +incondefs +incondefslib +linelen 9999 +longintegral
> +macroassign +macroempty +macroredef +matchanyintegral +nestedextern
> +noeffect +readonlystrings +realcompare +shadow -type
>
> # example usage: make splintopts='-posixstrictlib +posixlib
> +gnuextensions' splint
> splintopts =
>
> .PHONY: splint
> splint: $(c)
> @test `which $(SPLINT)` || echo please install splint,
> http://splint.org && exit 1
> $(SPLINT) $(splintflags) $(splintopts) $(c) > perl.fuzz
>
>
> _______________________________________________
> splint-discuss mailing list
> splint-discuss at cs.virginia.edu
> http://www.splint.org/mailman/listinfo/splint-discuss
>
More information about the splint-discuss
mailing list