mirror of https://gitee.com/bigwinds/arangodb
fixed issue #405: 1.2 compile warnings
This commit is contained in:
parent
cf9a942417
commit
7b92dcc9bc
|
@ -1,6 +1,8 @@
|
|||
v1.2.alpha (XXXX-XX-XX)
|
||||
-----------------------
|
||||
|
||||
* fixed issue #405: 1.2 compile warnings
|
||||
|
||||
* fixed issue #333: [debian] Group "arangodb" is not used when starting vie init.d script
|
||||
|
||||
* added optional parameter 'excludeSystem' to GET /_api/collection
|
||||
|
|
|
@ -531,6 +531,25 @@ static int GenerateMessage (char* buffer,
|
|||
return m + n;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief write to stderr
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void writeStderr (char const* line, size_t len) {
|
||||
ssize_t n;
|
||||
|
||||
while (0 < len) {
|
||||
n = TRI_WRITE(STDERR_FILENO, line, len);
|
||||
|
||||
if (n <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
line += n;
|
||||
len -= n;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief outputs a message string to all appenders
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -541,8 +560,8 @@ static void OutputMessage (TRI_log_level_e level,
|
|||
size_t length,
|
||||
bool copy) {
|
||||
if (! LoggingActive) {
|
||||
write(STDERR_FILENO, message, length);
|
||||
write(STDERR_FILENO, "\n", 1);
|
||||
writeStderr(message, length);
|
||||
writeStderr("\n", 1);
|
||||
|
||||
if (! copy) {
|
||||
TRI_FreeString(TRI_CORE_MEM_ZONE, message);
|
||||
|
@ -558,8 +577,8 @@ static void OutputMessage (TRI_log_level_e level,
|
|||
TRI_LockSpin(&AppendersLock);
|
||||
|
||||
if (Appenders._length == 0) {
|
||||
write(STDERR_FILENO, message, length);
|
||||
write(STDERR_FILENO, "\n", 1);
|
||||
writeStderr(message, length);
|
||||
writeStderr("\n", 1);
|
||||
|
||||
if (! copy) {
|
||||
TRI_FreeString(TRI_CORE_MEM_ZONE, message);
|
||||
|
|
Loading…
Reference in New Issue