Reduce compiler warnings.
This commit is contained in:
parent
e1fc19713a
commit
8acd331814
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=250875
@ -90,7 +90,8 @@ struct Buf *buf_prints (struct Buf *buf, const char *fmt, const char *s)
|
|||||||
*/
|
*/
|
||||||
struct Buf *buf_linedir (struct Buf *buf, const char* filename, int lineno)
|
struct Buf *buf_linedir (struct Buf *buf, const char* filename, int lineno)
|
||||||
{
|
{
|
||||||
char *dst, *src, *t;
|
char *dst, *t;
|
||||||
|
const char *src;
|
||||||
|
|
||||||
t = flex_alloc (strlen ("#line \"\"\n") + /* constant parts */
|
t = flex_alloc (strlen ("#line \"\"\n") + /* constant parts */
|
||||||
2 * strlen (filename) + /* filename with possibly all backslashes escaped */
|
2 * strlen (filename) + /* filename with possibly all backslashes escaped */
|
||||||
|
@ -135,9 +135,6 @@ struct filter *filter_create_int (struct filter *chain,
|
|||||||
bool filter_apply_chain (struct filter * chain)
|
bool filter_apply_chain (struct filter * chain)
|
||||||
{
|
{
|
||||||
int pid, pipes[2];
|
int pid, pipes[2];
|
||||||
int r;
|
|
||||||
const int readsz = 512;
|
|
||||||
char *buf;
|
|
||||||
|
|
||||||
|
|
||||||
/* Tricky recursion, since we want to begin the chain
|
/* Tricky recursion, since we want to begin the chain
|
||||||
|
@ -196,7 +196,11 @@ m4_ifdef( [[M4_YY_TABLES_EXTERNAL]],
|
|||||||
/* First, we deal with platform-specific or compiler-specific issues. */
|
/* First, we deal with platform-specific or compiler-specific issues. */
|
||||||
|
|
||||||
#if defined(__FreeBSD__)
|
#if defined(__FreeBSD__)
|
||||||
|
#ifndef __STDC_LIMIT_MACROS
|
||||||
|
#define __STDC_LIMIT_MACROS
|
||||||
|
#endif
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
#include <stdint.h>
|
||||||
#else
|
#else
|
||||||
#define __dead2
|
#define __dead2
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,7 +5,8 @@
|
|||||||
|
|
||||||
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
|
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
|
||||||
|
|
||||||
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
#if defined(__FreeBSD__) || \
|
||||||
|
(defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
|
||||||
|
|
||||||
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
|
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
|
||||||
* if you want the limit (max/min) macros for int types.
|
* if you want the limit (max/min) macros for int types.
|
||||||
|
@ -121,7 +121,7 @@ static struct yytbl_data *mkeoltbl (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Generate the table for possible eol matches. */
|
/* Generate the table for possible eol matches. */
|
||||||
static void geneoltbl ()
|
static void geneoltbl (void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -431,7 +431,7 @@ void genctbl ()
|
|||||||
|
|
||||||
/* mkecstbl - Make equivalence-class tables. */
|
/* mkecstbl - Make equivalence-class tables. */
|
||||||
|
|
||||||
struct yytbl_data *mkecstbl (void)
|
static struct yytbl_data *mkecstbl (void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct yytbl_data *tbl = 0;
|
struct yytbl_data *tbl = 0;
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
/* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
|
/* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
|
||||||
/* PURPOSE. */
|
/* PURPOSE. */
|
||||||
|
|
||||||
|
int yywrap (void);
|
||||||
int yywrap (void)
|
int yywrap (void)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1575,11 +1575,12 @@ void readin ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!do_yywrap) {
|
if (!do_yywrap) {
|
||||||
if (!C_plus_plus)
|
if (!C_plus_plus) {
|
||||||
if (reentrant)
|
if (reentrant)
|
||||||
outn ("\n#define yywrap(yyscanner) 1");
|
outn ("\n#define yywrap(yyscanner) 1");
|
||||||
else
|
else
|
||||||
outn ("\n#define yywrap() 1");
|
outn ("\n#define yywrap() 1");
|
||||||
|
}
|
||||||
outn ("#define YY_SKIP_YYWRAP");
|
outn ("#define YY_SKIP_YYWRAP");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,6 +113,7 @@ void action_define (defname, value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef notdef
|
||||||
/** Append "m4_define([[defname]],[[value]])m4_dnl\n" to the running buffer.
|
/** Append "m4_define([[defname]],[[value]])m4_dnl\n" to the running buffer.
|
||||||
* @param defname The macro name.
|
* @param defname The macro name.
|
||||||
* @param value The macro value, can be NULL, which is the same as the empty string.
|
* @param value The macro value, can be NULL, which is the same as the empty string.
|
||||||
@ -133,6 +134,7 @@ void action_m4_define (const char *defname, const char * value)
|
|||||||
snprintf (buf, sizeof(buf), "m4_define([[%s]],[[%s]])m4_dnl\n", defname, value?value:"");
|
snprintf (buf, sizeof(buf), "m4_define([[%s]],[[%s]])m4_dnl\n", defname, value?value:"");
|
||||||
add_action (buf);
|
add_action (buf);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Append "new_text" to the running buffer. */
|
/* Append "new_text" to the running buffer. */
|
||||||
void add_action (new_text)
|
void add_action (new_text)
|
||||||
|
@ -62,7 +62,7 @@ sf_init (void)
|
|||||||
_sf_stk = (scanflags_t*) flex_alloc ( sizeof(scanflags_t) * (_sf_max = 32));
|
_sf_stk = (scanflags_t*) flex_alloc ( sizeof(scanflags_t) * (_sf_max = 32));
|
||||||
if (!_sf_stk)
|
if (!_sf_stk)
|
||||||
lerrsf_fatal(_("Unable to allocate %ld of stack"),
|
lerrsf_fatal(_("Unable to allocate %ld of stack"),
|
||||||
(long)sizeof(scanflags_t));
|
(void *)(uintptr_t)sizeof(scanflags_t));
|
||||||
_sf_stk[_sf_top_ix] = 0;
|
_sf_stk[_sf_top_ix] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user