mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 17:56:00 +00:00
[XML]
Silence a warning on MSVC svn path=/trunk/; revision=49824
This commit is contained in:
parent
cc202fdc31
commit
ff164c8fa4
1 changed files with 6 additions and 3 deletions
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning ( disable : 4786 )
|
#pragma warning ( disable : 4786 )
|
||||||
|
#pragma warning ( disable : 4996 )
|
||||||
#endif//_MSC_VER
|
#endif//_MSC_VER
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
@ -41,7 +42,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "xml.h"
|
#include "xml.h"
|
||||||
#include "ssprintf.h"
|
|
||||||
|
|
||||||
#ifndef MAX_PATH
|
#ifndef MAX_PATH
|
||||||
#define MAX_PATH _MAX_PATH
|
#define MAX_PATH _MAX_PATH
|
||||||
|
@ -100,7 +100,9 @@ XMLException::XMLException (
|
||||||
|
|
||||||
void XMLException::SetExceptionV ( const std::string& location, const char* format, va_list args )
|
void XMLException::SetExceptionV ( const std::string& location, const char* format, va_list args )
|
||||||
{
|
{
|
||||||
_e = location + ": " + ssvprintf(format,args);
|
char buffer[1024];
|
||||||
|
_vsnprintf(buffer, sizeof(buffer)-1, format, args);
|
||||||
|
_e = location + ": " + buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void XMLException::SetException ( const std::string& location, const char* format, ... )
|
void XMLException::SetException ( const std::string& location, const char* format, ... )
|
||||||
|
@ -424,13 +426,14 @@ string
|
||||||
XMLFile::Location() const
|
XMLFile::Location() const
|
||||||
{
|
{
|
||||||
int line = 1;
|
int line = 1;
|
||||||
|
char line_str[10];
|
||||||
const char* p = strchr ( _buf.c_str(), '\n' );
|
const char* p = strchr ( _buf.c_str(), '\n' );
|
||||||
while ( p && p < _p )
|
while ( p && p < _p )
|
||||||
{
|
{
|
||||||
++line;
|
++line;
|
||||||
p = strchr ( p+1, '\n' );
|
p = strchr ( p+1, '\n' );
|
||||||
}
|
}
|
||||||
return ssprintf ( "%s(%i)",_filename.c_str(), line );
|
return _filename + "(" + itoa(line, line_str, 10) + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
XMLAttribute::XMLAttribute()
|
XMLAttribute::XMLAttribute()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue