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

@@ -63,7 +63,7 @@ const char* loutFeatureProcessor::convertToLiteral(const char* str)
if ( literalBufferSize < 2*size + 3 ) {
literalBufferSize = 2*size + 3;
literalBufferSize *= 2;
delete literalBuffer;
delete [] literalBuffer;
literalBuffer = new char[literalBufferSize];
}

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];
}

View File

@@ -51,7 +51,7 @@
#include "compression/code.h"
encoding_unit::encoding_unit(ostring* w, unsigned int f) :
word(w), freq(f), code(0), bits(0), leaf_htr_node(NULL)
word(w), bits(0), freq(f), code(0), leaf_htr_node(NULL)
{
}

View File

@@ -40,7 +40,7 @@ char *Exception::g_next_avail = Exception::g_temp_space;
// /////////////////////////////////////////////////////////////////
Exception::Exception()
: f_thrown(0), f_thrown_as_pointer(1), f_temporary(0), f_line(0), f_file(NULL), f_previous_exception(NULL)
: f_thrown(0), f_thrown_as_pointer(1), f_temporary(0), f_file(NULL), f_line(0), f_previous_exception(NULL)
{
PRINTF (("Constructed Exception obj @ %p\n", this));
}

View File

@@ -439,7 +439,7 @@ io_status oid_list::asciiIn(istream& in)
list_ptr.p -> set(oid_array, v_sz);
}
delete oid_array;
delete [] oid_array;
return done;
}

View File

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