Being a bit more strict on warnings (-Wall).
This commit is contained in:
committed by
Manoël Trapier
parent
74fb1cff61
commit
a262a916dc
@@ -387,10 +387,6 @@ static short LL_index[] = {0,0,
|
||||
* This file is copied into Lpars.c.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char *rcsid = "$Id$";
|
||||
#endif
|
||||
|
||||
unsigned int LLtcnt[LL_NTERMINALS];
|
||||
unsigned int LLscnt[LL_NSETS];
|
||||
int LLcsymb, LLsymb;
|
||||
|
||||
@@ -15,40 +15,37 @@
|
||||
* alloc.c
|
||||
* Interface to malloc() and realloc()
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
# include "types.h"
|
||||
# include "extern.h"
|
||||
|
||||
# ifndef NORCSID
|
||||
static string rcsid = "$Id$";
|
||||
# endif
|
||||
# include "LLgen.h"
|
||||
|
||||
static string e_nomem = "Out of memory";
|
||||
|
||||
p_mem
|
||||
alloc(size) unsigned size; {
|
||||
p_mem alloc(unsigned int size)
|
||||
{
|
||||
/*
|
||||
Allocate "size" bytes. Panic if it fails
|
||||
*/
|
||||
p_mem p;
|
||||
|
||||
if ((p = malloc(size)) == 0) fatal(linecount,e_nomem);
|
||||
if ((p = malloc(size)) == 0) fatal(linecount,e_nomem, NULL, NULL);
|
||||
return p;
|
||||
}
|
||||
|
||||
p_mem
|
||||
ralloc(p,size) p_mem p; unsigned size; {
|
||||
p_mem ralloc(p_mem p, unsigned int size)
|
||||
{
|
||||
/*
|
||||
Re-allocate the chunk of memory indicated by "p", to
|
||||
occupy "size" bytes
|
||||
*/
|
||||
if ((p = realloc(p,size)) == 0) fatal(linecount,e_nomem);
|
||||
if ((p = realloc(p,size)) == 0) fatal(linecount,e_nomem, NULL, NULL);
|
||||
return p;
|
||||
}
|
||||
|
||||
p_mem
|
||||
new_mem(p) register p_info p; {
|
||||
p_mem new_mem(p_info p)
|
||||
{
|
||||
/*
|
||||
This routine implements arrays that can grow.
|
||||
It must be called every time a new element is added to it.
|
||||
@@ -60,7 +57,7 @@ new_mem(p) register p_info p; {
|
||||
be updated each time this routine is called
|
||||
*/
|
||||
p_mem rp;
|
||||
unsigned sz;
|
||||
unsigned int sz;
|
||||
|
||||
if (p->i_max >= p->i_top) { /* No more free elements */
|
||||
sz = p->i_size;
|
||||
|
||||
@@ -579,6 +579,7 @@ static int nc_nfollow(p_nont p)
|
||||
return follow(p->n_nc_follow, p->n_rule);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int nc_follow(p_set setp, p_gram p)
|
||||
{
|
||||
/*
|
||||
@@ -650,6 +651,7 @@ static int nc_follow(p_set setp, p_gram p)
|
||||
p++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -20,10 +20,6 @@
|
||||
# include "extern.h"
|
||||
# include "io.h"
|
||||
|
||||
# ifndef NORCSID
|
||||
static string rcsid4 = "$Id$";
|
||||
# endif
|
||||
|
||||
char ltext[LTEXTSZ];
|
||||
p_nont nonterms;
|
||||
p_nont maxnt;
|
||||
|
||||
@@ -24,16 +24,9 @@
|
||||
|
||||
#include "LLgen.h"
|
||||
|
||||
# ifndef NORCSID
|
||||
static string rcsid5 = "$Id$";
|
||||
# endif
|
||||
|
||||
/* In this file the following routines are defined: */
|
||||
/* extern UNLINK(); */
|
||||
/* extern RENAME(); */
|
||||
/* extern string libpath(); */
|
||||
|
||||
void UNLINK(string x) {
|
||||
void UNLINK(string x)
|
||||
{
|
||||
/* Must remove the file "x" */
|
||||
|
||||
#ifdef USE_SYS
|
||||
|
||||
@@ -23,12 +23,15 @@
|
||||
#include "assert.h"
|
||||
#include "LLgen.h"
|
||||
|
||||
#include <missing_proto.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
register string arg;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
string arg;
|
||||
string libpath();
|
||||
char *beg_sbrk = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user