# endif
-static int file_size_and_mode (int p_fd, /*@out@*/ __mode_t *p_mode_pointer,
+static int file_size_and_mode (int p_fd, /*@out@*/ mode_t *p_mode_pointer,
/*@out@*/ size_t *p_size_pointer);
static int safe_read (int p_desc, /*@out@*/ char *p_ptr, int p_len);
defn->predefined = NULL;
exp_p = defn->expansion = (char *) defn + sizeof (*defn);
+ *defn->expansion = '\0'; /* convince splint it is initialized */
defn->line = 0;
defn->rest_args = NULL;
llfatalbug (cstring_makeLiteral ("Maximum definition size exceeded."));
}
- /*@i1@*/ return defn; /* Spurious warning here */
+ return defn; /* Spurious warning here */
}
/*
{
llfatalbug (cstring_makeLiteral ("Maximum definition size exceeded."));
}
-
- /*@i1@*/ return defn; /* Spurious warning here */
+
+ /*@-compdef@*/ /* defn->expansion defined? */
+ return defn;
+ /*@=compdef@*/
}
/*
bool system_header_p,
/*@dependent@*/ struct file_name_list *dirptr)
{
- __mode_t st_mode;
+ mode_t st_mode; /* was __mode_t */
size_t st_size;
long i;
int length = 0;
*/
static int
-file_size_and_mode (int fd, __mode_t *mode_pointer, size_t *size_pointer)
+file_size_and_mode (int fd, mode_t *mode_pointer, size_t *size_pointer)
{
struct stat sbuf;
if (fstat (fd, &sbuf) < 0) {
*mode_pointer = 0;
*size_pointer = 0;
- /*@i2@*/ return (-1); /* Spurious warnings! */
+ /*@-compdestroy@*/ /* possibly spurious warnings here (or memory leak) */
+ return (-1);
+ /*@=compdestroy@*/
}
if (mode_pointer != NULL)
{
+ /*@-type@*/ /* confusion between __mode_t and mode_t types */
*mode_pointer = sbuf.st_mode;
+ /*@=type@*/
}
if (size_pointer != NULL)
*size_pointer = (size_t) sbuf.st_size;
}
- /*@i4@*/ return 0; /* spurious warnings here */
+ /*@-compdestroy@*/ /* possibly spurious warnings here (or memory leak) */
+ return 0;
+ /*@=compdestroy@*/
}
/* Read LEN bytes at PTR from descriptor DESC, for file FILENAME,
}
pmark->position = pbuf->cur - pbuf->buf;
- DPRINTF (("move mark: %s", pmark->position));
+ DPRINTF (("move mark: %d", pmark->position));
}
void cpplib_initializeReader (cppReader *pfile) /* Must be done after library is loaded. */
{
bool checkmacro = FALSE;
bool hasParams = FALSE;
- bool noexpand = FALSE;
cstring sname;
char c;
}
else
{
- if (noexpand)
- {
- checkmacro = TRUE;
-
- if (!expectenditer)
- {
- noexpand = FALSE;
- }
- }
- else
- {
if (usymtab_existsReal (sname))
{
uentry ue = usymtab_lookup (sname);
incLine ();
}
}
- }
}
if (!checkmacro)