Fix warnings on FreeBSD

This commit is contained in:
Ulrich Wilkens
2018-06-01 03:55:10 +02:00
committed by Jon Trulson
parent 885b65a09a
commit 297b6bd845
65 changed files with 342 additions and 269 deletions

View File

@@ -47,7 +47,7 @@ static ostrstream& terminate(ostrstream& ost)
#endif
DocParser::DocParser(Resolver &r)
: f_resolver(r), f_ignoring_element(0),
: f_ignoring_element(0), f_resolver(r),
#if defined(SC3)
f_buffer(new char[DATA_BUF_SIZ]),
f_output(f_buffer, DATA_BUF_SIZ)

View File

@@ -22,6 +22,7 @@
*/
// $TOG: defParser.C /main/5 1997/12/23 11:16:25 bill $
#ifndef lint
__attribute__((unused))
static const char defParsersccsid[] = "@(#)yaccpar 1.8 (Berkeley) 01/20/90";
#endif
#define defParserBYACC 1

View File

@@ -235,7 +235,7 @@ void addToDefTokenStringBuf(const unsigned char* str, int size)
defToken_string_buf_size = 2*(size+defToken_string_buf_content_size);
unsigned char* x = new unsigned char[defToken_string_buf_size];
memcpy(x, defToken_string_buf, defToken_string_buf_content_size);
delete defToken_string_buf;
delete [] defToken_string_buf;
defToken_string_buf = x;
}

View File

@@ -51,7 +51,7 @@ void addToDefTokenStringBuf(const unsigned char* str, int size)
defToken_string_buf_size = 2*(size+defToken_string_buf_content_size);
unsigned char* x = new unsigned char[defToken_string_buf_size];
memcpy(x, defToken_string_buf, defToken_string_buf_content_size);
delete defToken_string_buf;
delete [] defToken_string_buf;
defToken_string_buf = x;
}

View File

@@ -22,6 +22,7 @@
*/
// $TOG: style.C /main/6 1998/04/17 11:51:49 mgreess $
#ifndef lint
__attribute__((unused))
static const char stylesccsid[] = "@(#)yaccpar 1.8 (Berkeley) 01/20/90";
#endif
#define styleBYACC 1

View File

@@ -263,7 +263,7 @@ void addToQstringBuf(const unsigned char* str, int size)
qstring_buf_size = 2*(size+qstring_buf_content_size);
unsigned char* x = new unsigned char[qstring_buf_size];
memcpy(x, qstring_buf, qstring_buf_content_size);
delete qstring_buf;
delete [] qstring_buf;
qstring_buf = x;
}
@@ -699,7 +699,7 @@ case 2:
# line 99 "tokenStyle.l"
{
if ( commentBufferSize < styleleng ) {
delete commentBuffer;
delete [] commentBuffer;
commentBufferSize = 2 * styleleng ;
commentBuffer = new char [commentBufferSize];
}

View File

@@ -77,7 +77,7 @@ void addToQstringBuf(const unsigned char* str, int size)
qstring_buf_size = 2*(size+qstring_buf_content_size);
unsigned char* x = new unsigned char[qstring_buf_size];
memcpy(x, qstring_buf, qstring_buf_content_size);
delete qstring_buf;
delete [] qstring_buf;
qstring_buf = x;
}
@@ -98,7 +98,7 @@ unit ([Ii][Nn]|[Ii][Nn][Cc][Hh]|[Pp][Cc]|[Pp][Ii][Cc][Aa]|[Pp][Tt]|[Pp][Oo][Ii][
^"#".* {
if ( commentBufferSize < yyleng ) {
delete commentBuffer;
delete [] commentBuffer;
commentBufferSize = 2 * yyleng ;
commentBuffer = new char [commentBufferSize];
}