> When fiddling with 'make splint' I ran into a Splint parse error: > > src/exceptions.c:500:25: Variable size initialized to type int, expects > size_t: backtrace(array, 32) > src/exceptions.c:503:36: Unrecognized format code: %zd stack frames (max > trace depth is %d).\n > src/exceptions.c:507:17: Unrecognized identifier: Dl_info > src/exceptions.c:507:26: Parse Error. (For help on parse errors, see > splint -help parseerrors.)
The backtrace function returns int, but this code was using size_t, and the size_t usage is the reason for the z format modifirer. Fixed in r31617 > 'dladdr()' and 'Dl_info' seem to be not in POSIX, but seem to be a > common extension. > I tried passing '+gnu-extensions' on the splint command line, but that > didn't help. > > I also tried to define the missing type Dl_info with a preprocessor > directive, but that didn't help > either. > > SPLINTFLAGS_TEST = \ > +posixlib > -DDl_info="struct { const char *dli_fname; void *dli_fbase; const > char *dli_sname; void *dli_saddr; }" \ You can try: -D__GNU_SOURCE -- Salu2