summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorAaron Brashears <aaronb@lindenlab.com>2007-02-02 17:28:58 +0000
committerAaron Brashears <aaronb@lindenlab.com>2007-02-02 17:28:58 +0000
commit305c74d5163c5e344a675d39ca2394a9e45bd2c2 (patch)
tree42836c4a6010b2b015156024d3cfb6bf64a48ad6 /indra/llcommon
parent54d89549df38bb61881583a3eb8d3645c107d79f (diff)
Result of svn merge -r57264:57370 svn+ssh://svn/svn/linden/branches/adroit.r40-68 into release.
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llerror.h2
-rw-r--r--indra/llcommon/llfile.cpp8
-rw-r--r--indra/llcommon/llfile.h4
-rw-r--r--indra/llcommon/llpreprocessor.h2
-rw-r--r--indra/llcommon/llprocessor.cpp10
-rw-r--r--indra/llcommon/llsdserialize.cpp4
-rw-r--r--indra/llcommon/llstring.h2
-rw-r--r--indra/llcommon/llsys.cpp12
-rw-r--r--indra/llcommon/u64.cpp12
9 files changed, 28 insertions, 28 deletions
diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h
index 796ec4a421..d3d680ed33 100644
--- a/indra/llcommon/llerror.h
+++ b/indra/llcommon/llerror.h
@@ -180,7 +180,7 @@ inline std::string llerror_file_line(const char* file, S32 line)
#endif
// handy compile-time assert - enforce those template parameters!
-#define cassert(expn) typedef char __C_ASSERT__[(expn)?1:-1]
+#define cassert(expn) typedef char __C_ASSERT__[(expn)?1:-1] /* Flawfinder: ignore */
// Makes the app go down in flames, but on purpose!
void _llcrash_and_loop();
diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp
index a02383c69e..16e2f5c5a1 100644
--- a/indra/llcommon/llfile.cpp
+++ b/indra/llcommon/llfile.cpp
@@ -165,9 +165,9 @@ void llifstream::close()
}
}
-void llifstream::open(const char *_Filename,
+void llifstream::open(const char* _Filename, /* Flawfinder: ignore */
ios_base::openmode _Mode,
- int _Prot) /* Flawfinder: ignore */
+ int _Prot)
{ // open a C stream with specified mode
FILE* filep = LLFile::_Fiopen(_Filename,_Mode | ios_base::in, _Prot);
@@ -211,9 +211,9 @@ bool llofstream::is_open() const
return false;
}
-void llofstream::open(const char *_Filename,
+void llofstream::open(const char* _Filename, /* Flawfinder: ignore */
ios_base::openmode _Mode,
- int _Prot) /* Flawfinder: ignore */
+ int _Prot)
{ // open a C stream with specified mode
FILE* filep = LLFile::_Fiopen(_Filename,_Mode | ios_base::out, _Prot);
diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h
index c7c4d2718a..67de0f43fc 100644
--- a/indra/llcommon/llfile.h
+++ b/indra/llcommon/llfile.h
@@ -88,9 +88,9 @@ public:
return _Filebuffer;
}
bool is_open() const;
- void open(const char *_Filename,
+ void open(const char* _Filename, /* Flawfinder: ignore */
ios_base::openmode _Mode = ios_base::in,
- int _Prot = (int)ios_base::_Openprot); /* Flawfinder: ignore */
+ int _Prot = (int)ios_base::_Openprot);
void close();
private:
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h
index 564c32cb0d..1b3bcf7919 100644
--- a/indra/llcommon/llpreprocessor.h
+++ b/indra/llcommon/llpreprocessor.h
@@ -61,7 +61,7 @@
// Deal with the differeneces on Windows
#if defined(LL_WINDOWS)
-#define snprintf _snprintf
+#define snprintf _snprintf /*Flawfinder: ignore*/
#endif // LL_WINDOWS
// Static linking with apr on windows needs to be declared.
diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp
index 64f4875489..a044710195 100644
--- a/indra/llcommon/llprocessor.cpp
+++ b/indra/llcommon/llprocessor.cpp
@@ -585,7 +585,7 @@ bool CProcessor::AnalyzeIntelProcessor()
mov sig3, edx
}
// Then we convert the data to a readable string
- snprintf(
+ snprintf( /* Flawfinder: ignore */
CPUInfo.strProcessorSerial,
sizeof(CPUInfo.strProcessorSerial),
"%04lX-%04lX-%04lX-%04lX-%04lX-%04lX",
@@ -593,15 +593,15 @@ bool CProcessor::AnalyzeIntelProcessor()
sig1 & 0xFFFF,
sig3 >> 16,
sig3 & 0xFFFF,
- sig2 >> 16, sig2 & 0xFFFF); /* Flawfinder: ignore */
+ sig2 >> 16, sig2 & 0xFFFF);
}
else
{
// If there's no serial number support we just put "No serial number"
- snprintf(
+ snprintf( /* Flawfinder: ignore */
CPUInfo.strProcessorSerial,
sizeof(CPUInfo.strProcessorSerial),
- "No Processor Serial Number"); /* Flawfinder: ignore */
+ "No Processor Serial Number");
}
// Now we get the standard processor extensions
@@ -835,7 +835,7 @@ bool CProcessor::AnalyzeAMDProcessor()
break;
case 0xD: // Model = 0xD: K6-2+ / K6-III+
strcpy(CPUInfo.strModel, "AMD K6-2+ or K6-III+ (0.18 micron)"); /* Flawfinder: ignore */
- strncat(strCPUName, "AMD K6-2+ or K6-III+ (0.18 micron)", sizeof(strCPUName) - strlen(strCPUName) -1);
+ strncat(strCPUName, "AMD K6-2+ or K6-III+ (0.18 micron)", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */
break;
default: // ...
strcpy(CPUInfo.strModel, "Unknown AMD K5 or K6 model"); /* Flawfinder: ignore */
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index fb8efc91ca..dfe7ec136c 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -785,7 +785,7 @@ S32 LLSDBinaryParser::parse(std::istream& istr, LLSD& data) const
// the size, and read it.
// *FIX: Should we set a maximum size?
U32 size_nbo = 0;
- istr.read((char*)&size_nbo, sizeof(U32));
+ istr.read((char*)&size_nbo, sizeof(U32)); /*Flawfinder: ignore*/
S32 size = (S32)ntohl(size_nbo);
std::vector<U8> value;
if(size)
@@ -925,7 +925,7 @@ void LLSDFormatter::realFormat(const std::string& format)
void LLSDFormatter::formatReal(LLSD::Real real, std::ostream& ostr) const
{
char buffer[MAX_STRING]; /* Flawfinder: ignore */
- snprintf(buffer, MAX_STRING, mRealFormat.c_str(), real);
+ snprintf(buffer, MAX_STRING, mRealFormat.c_str(), real); /* Flawfinder: ignore */
ostr << buffer;
}
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index dca8ce4f3e..0555231010 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -82,7 +82,7 @@ struct char_traits<U16>
static char_type*
copy(char_type* __s1, const char_type* __s2, size_t __n)
- { return static_cast<char_type*>(memcpy(__s1, __s2, __n * sizeof(char_type))); }
+ { return static_cast<char_type*>(memcpy(__s1, __s2, __n * sizeof(char_type))); } /* Flawfinder: ignore */
static char_type*
assign(char_type* __s, size_t __n, char_type __a)
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index b50c0a13ce..ad6f85b068 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -113,23 +113,23 @@ LLOSInfo::LLOSInfo() :
char tmp[MAX_STRING]; /* Flawfinder: ignore */
if(osvi.dwMajorVersion <= 4)
{
- snprintf(
+ snprintf( /* Flawfinder: ignore */
tmp,
sizeof(tmp),
"version %d.%d %s (Build %d)",
osvi.dwMajorVersion,
osvi.dwMinorVersion,
csdversion.c_str(),
- (osvi.dwBuildNumber & 0xffff)); /* Flawfinder: ignore */
+ (osvi.dwBuildNumber & 0xffff));
}
else
{
- snprintf(
+ snprintf( /* Flawfinder: ignore */
tmp,
sizeof(tmp),
"%s (Build %d)",
csdversion.c_str(),
- (osvi.dwBuildNumber & 0xffff)); /*Flawfinder: ignore*/
+ (osvi.dwBuildNumber & 0xffff));
}
mOSString += tmp;
}
@@ -231,7 +231,7 @@ U32 LLOSInfo::getProcessVirtualSizeKB()
#if LL_WINDOWS
#endif
#if LL_LINUX
- FILE *status_filep = LLFile::fopen("/proc/self/status", "r");
+ FILE* status_filep = LLFile::fopen("/proc/self/status", "r"); /* Flawfinder: ignore */
S32 numRead = 0;
char buff[STATUS_SIZE]; /* Flawfinder: ignore */
bzero(buff, STATUS_SIZE);
@@ -257,7 +257,7 @@ U32 LLOSInfo::getProcessResidentSizeKB()
#if LL_WINDOWS
#endif
#if LL_LINUX
- FILE *status_filep = LLFile::fopen("/proc/self/status", "r");
+ FILE* status_filep = LLFile::fopen("/proc/self/status", "r"); /* Flawfinder: ignore */
if (status_filep != NULL)
{
S32 numRead = 0;
diff --git a/indra/llcommon/u64.cpp b/indra/llcommon/u64.cpp
index c8b8bc4a28..7f0323aaad 100644
--- a/indra/llcommon/u64.cpp
+++ b/indra/llcommon/u64.cpp
@@ -47,27 +47,27 @@ char* U64_to_str(U64 value, char* result, S32 result_size)
if (part1)
{
- snprintf(
+ snprintf( /* Flawfinder: ignore */
result,
result_size,
"%u%07u%07u",
- part1,part2,part3); /* Flawfinder: ignore */
+ part1,part2,part3);
}
else if (part2)
{
- snprintf(
+ snprintf( /* Flawfinder: ignore */
result,
result_size,
"%u%07u",
- part2,part3); /* Flawfinder: ignore */
+ part2,part3);
}
else
{
- snprintf(
+ snprintf( /* Flawfinder: ignore */
result,
result_size,
"%u",
- part3); /* Flawfinder: ignore */
+ part3);
}
return (result);
}