logo       

Re: Preprocessing error , need help: msg#00010

programming.splint.general

Subject: Re: Preprocessing error , need help

Thanks for your help, now I solved the problem about include head file, but I got the error I still can't find a solution.

$ splint  -I/home/alex/svn/prj6_ha2/branches/module/ha_code/contrib/grm/  -I/home/alex/svn/prj6_ha2/trunk/module/heartbeat/libltdl -I/home/alex/svn/prj6_ha2/branches/module/heartbeat/linux-ha/ -I/usr/include/glib- 2.0/ -I/home/alex/svn/prj6_ha2/branches/module/heartbeat/include/ -I/home/alex/svn/prj6_ha2/branches/module/heartbeat/contrib/nrm/  +posixlib -preproc  nrmd.c



Splint 3.1.1 --- 22 Aug 2006

/usr/include/arpa/inet.h:35:27 : Parse Error. (For help on parse errors, see
               splint -help parseerrors.)
*** Cannot continue.



so , I run:
$ cat -n /usr/include/arpa/inet.h | grep -3  35

    32
    33  /* Convert Internet host address from numbers-and-dots notation in CP
    34     into binary data in network byte order.  */
    35  extern in_addr_t inet_addr (__const char *__cp) __THROW;
    36
    37  /* Return the local host address part of the Internet address in IN.  */
    38  extern in_addr_t inet_lnaof (struct in_addr __in) __THROW;


I don't know why paser error at line 35, so ......:-)

best regard!





2006/8/25, Ludolf Holzheid < lholzheid@xxxxxxxxxxxxxxxxx>:
On Thu, 2006-08-24 10:37:17 +0800, jiping shao wrote:
> [..]
> Splint 3.1.1 --- 22 Aug 2006
>
> Command Line: Setting +gnuextensions redundant with current value

Hello Jiping,

This first message is a warning only, saying the '+gnuextensions' flag
does not change anything (as it is the default).

If you still want to specify '+gnuextensions' on the command line and
you don't want to see this message, place a '-warnflags' flag left of
'+gnuextensions'.

> nrmd.c:18:25: Cannot find include file portability.h on search path:
>    /usr/include/...
>  Preprocessing error. (Use -preproc to inhibit warning)

This is a fatal error:  Splint does not find ' portability.h' in the
directories given as search path.

> ../../../../../tags/tag1/module/heartbeat/include/heartbeat.h:77:66:
>    #error "Syslog.h does not define either LOG_PRI or LOG_PRIMASK."
>   In file included from nrmd.c:37

In 'heartbeat.h', it is checked whether LOG_PRI or LOG_PRIMASK is
defined. They are not (maybe due to the missing header). Reaching an
#error directive is regarded as a fatal error.

This is a fatal error too.

> ../../../../../tags/tag1/module/heartbeat/contrib/nrm/nrm_api.h:27:25:
>    Cannot find include file portability.h on search path:
>    /usr/include/...
>   In file included from nrmd.c:54

'portability.h' is missing again.

> ../../../../../tags/tag1/module/heartbeat/contrib/nrm/nrm_msg.h:35:25:
>    Cannot find include file portability.h on search path:
>    /usr/include/...
>   In file included from nrmd.c:55

'portability.h' should be included a third time.

> Preprocessing error for file:
> /home/alex/svn/prj6_ha2/branches/module/heartbeat/
>    contrib/nrm/nrmd.c
> *** Cannot continue.

This final message means, splint bailed out after preprocessing phase.


It's a proven strategy to take care for the first error message first,
so try adding the path to 'portability.h ' to the search path.

OTOH, if 'nrmd.c' cannot be compiled (due to the compiler also chokes
on the missing headers and failed tests), you may still run splint on
it by specifying '-preproc' flag. (I'm not sure whether this would be
meaningful, though).

HTH,

Ludolf

--

---------------------------------------------------------------
Ludolf Holzheid             Tel:    +49 621 339960
Bihl+Wiedemann GmbH         Fax:    +49 621 3392239
Floßwörthstraße 41          e-mail: lholzheid@xxxxxxxxxxxxxxxxx
D-68199 Mannheim, Germany
---------------------------------------------------------------

LocalWords:  warnflags


_______________________________________________
splint-discuss mailing list
splint-discuss-Y5+ky9gHf7K61byRX2g7jjevRRvlBcP1@xxxxxxxxxxxxxxxx
http://www.cs.Virginia.EDU/mailman-2.1.5/listinfo/splint-discuss
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise