mirror of https://github.com/BOINC/boinc.git
lib: fix compiler warnings
svn path=/trunk/boinc/; revision=22013
This commit is contained in:
parent
0c948a656a
commit
ecddbe3cad
|
@ -5284,3 +5284,9 @@ David 19 Jul 2010
|
||||||
lib/
|
lib/
|
||||||
notice.cpp
|
notice.cpp
|
||||||
parse.cpp,h
|
parse.cpp,h
|
||||||
|
|
||||||
|
Charlie 19 Jul 2010
|
||||||
|
- lib: fix compiler warnings.
|
||||||
|
|
||||||
|
lib/
|
||||||
|
parse.cpp
|
||||||
|
|
|
@ -640,7 +640,7 @@ bool XML_PARSER::get(char* buf, int len, bool& is_tag, char* attr_buf, int attr_
|
||||||
bool XML_PARSER::parse_str(
|
bool XML_PARSER::parse_str(
|
||||||
char* parsed_tag, const char* start_tag, char* buf, int len
|
char* parsed_tag, const char* start_tag, char* buf, int len
|
||||||
) {
|
) {
|
||||||
bool is_tag, eof;
|
bool is_tag = false, eof;
|
||||||
char end_tag[256], tag[256], tmp[64000];
|
char end_tag[256], tag[256], tmp[64000];
|
||||||
|
|
||||||
// handle the archaic form <tag/>, which means empty string
|
// handle the archaic form <tag/>, which means empty string
|
||||||
|
@ -701,7 +701,7 @@ bool XML_PARSER::parse_string(
|
||||||
//
|
//
|
||||||
bool XML_PARSER::parse_int(char* parsed_tag, const char* start_tag, int& i) {
|
bool XML_PARSER::parse_int(char* parsed_tag, const char* start_tag, int& i) {
|
||||||
char buf[256], *end;
|
char buf[256], *end;
|
||||||
bool is_tag, eof;
|
bool is_tag = false, eof;
|
||||||
char end_tag[256], tag[256];
|
char end_tag[256], tag[256];
|
||||||
|
|
||||||
if (strcmp(parsed_tag, start_tag)) return false;
|
if (strcmp(parsed_tag, start_tag)) return false;
|
||||||
|
@ -736,7 +736,7 @@ bool XML_PARSER::parse_int(char* parsed_tag, const char* start_tag, int& i) {
|
||||||
//
|
//
|
||||||
bool XML_PARSER::parse_double(char* parsed_tag, const char* start_tag, double& x) {
|
bool XML_PARSER::parse_double(char* parsed_tag, const char* start_tag, double& x) {
|
||||||
char buf[256], *end;
|
char buf[256], *end;
|
||||||
bool is_tag, eof;
|
bool is_tag = false, eof;
|
||||||
char end_tag[256], tag[256];
|
char end_tag[256], tag[256];
|
||||||
|
|
||||||
if (strcmp(parsed_tag, start_tag)) return false;
|
if (strcmp(parsed_tag, start_tag)) return false;
|
||||||
|
@ -769,7 +769,7 @@ bool XML_PARSER::parse_double(char* parsed_tag, const char* start_tag, double& x
|
||||||
//
|
//
|
||||||
bool XML_PARSER::parse_bool(char* parsed_tag, const char* start_tag, bool& b) {
|
bool XML_PARSER::parse_bool(char* parsed_tag, const char* start_tag, bool& b) {
|
||||||
char buf[256], *end;
|
char buf[256], *end;
|
||||||
bool is_tag, eof;
|
bool is_tag = false, eof;
|
||||||
char end_tag[256], tag[256];
|
char end_tag[256], tag[256];
|
||||||
|
|
||||||
// handle the archaic form <tag/>, which means true
|
// handle the archaic form <tag/>, which means true
|
||||||
|
@ -805,7 +805,7 @@ bool XML_PARSER::parse_bool(char* parsed_tag, const char* start_tag, bool& b) {
|
||||||
//
|
//
|
||||||
bool XML_PARSER::parse_start(const char* start_tag) {
|
bool XML_PARSER::parse_start(const char* start_tag) {
|
||||||
char tag[256];
|
char tag[256];
|
||||||
bool eof, is_tag;
|
bool eof, is_tag = false;
|
||||||
|
|
||||||
eof = get(tag, sizeof(tag), is_tag);
|
eof = get(tag, sizeof(tag), is_tag);
|
||||||
if (eof || !is_tag ) {
|
if (eof || !is_tag ) {
|
||||||
|
@ -861,7 +861,7 @@ void XML_PARSER::skip_unexpected(
|
||||||
const char* start_tag, bool verbose, const char* where
|
const char* start_tag, bool verbose, const char* where
|
||||||
) {
|
) {
|
||||||
char tag[256], end_tag[256];
|
char tag[256], end_tag[256];
|
||||||
bool is_tag;
|
bool is_tag = false;
|
||||||
|
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
fprintf(stderr, "Unrecognized XML in %s: %s\n", where, start_tag);
|
fprintf(stderr, "Unrecognized XML in %s: %s\n", where, start_tag);
|
||||||
|
@ -883,7 +883,7 @@ void XML_PARSER::skip_unexpected(
|
||||||
#if 0
|
#if 0
|
||||||
void parse(FILE* f) {
|
void parse(FILE* f) {
|
||||||
char tag[256];
|
char tag[256];
|
||||||
bool is_tag, flag;
|
bool is_tag = false, flag;
|
||||||
MIOFILE mf;
|
MIOFILE mf;
|
||||||
XML_PARSER xp(&mf);
|
XML_PARSER xp(&mf);
|
||||||
char name[256];
|
char name[256];
|
||||||
|
|
Loading…
Reference in New Issue