[Libreoffice-commits] core.git: 3 commits - sal/osl sw/source
Tor Lillqvist
tml at collabora.com
Tue Feb 3 05:18:38 PST 2015
sal/osl/unx/conditn.cxx | 50 ++++++++++++++++++++---------------------
sal/osl/unx/pipe.cxx | 38 +++++++++++++++----------------
sw/source/core/crsr/viscrs.cxx | 6 ++++
3 files changed, 50 insertions(+), 44 deletions(-)
New commits:
commit fcba36b6b7efdf9222ccf9d330297b90cd04eb33
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Feb 3 14:16:40 2015 +0100
WaE: unused variable 'rects'
Put the whole non-DESKTOP case in #if 0 for now. Unclear what we
actualy need to do there.
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 35b60a3a..a0031b0 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -307,6 +307,9 @@ void SwSelPaintRects::Show()
HighlightInputFld();
#else
+
+#if 0 // Totally unclear what we want to do here?
+
const OutputDevice* pOut = GetShell()->GetWin();
if ( ! pOut )
pOut = GetShell()->GetOut();
@@ -315,6 +318,7 @@ void SwSelPaintRects::Show()
{
if (pWrtShell)
{
+
// Buffer will be deallocated in the UI layer
MLORect *rects = (MLORect *) malloc((sizeof(MLORect))*size());
for (size_t i = 0; i < size(); ++i)
@@ -342,6 +346,8 @@ void SwSelPaintRects::Show()
// touch_ui_selection_none();
}
#endif
+
+#endif
}
}
commit ff6ad0df2756190c62122e7dc20d34e6af2e1704
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Feb 3 13:58:13 2015 +0100
Let's use log tags starting with "sal" here in sal
diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx
index 2216380..f4833f3 100644
--- a/sal/osl/unx/pipe.cxx
+++ b/sal/osl/unx/pipe.cxx
@@ -209,7 +209,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
if (bNameTooLong)
{
- SAL_WARN("osl.pipe", "osl_createPipe: pipe name too long");
+ SAL_WARN("sal.osl.pipe", "osl_createPipe: pipe name too long");
return NULL;
}
@@ -223,7 +223,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
pPipe->m_Socket = socket(AF_UNIX, SOCK_STREAM, 0);
if ( pPipe->m_Socket < 0 )
{
- SAL_WARN("osl.pipe", "socket() failed: " << strerror(errno));
+ SAL_WARN("sal.osl.pipe", "socket() failed: " << strerror(errno));
__osl_destroyPipeImpl(pPipe);
return NULL;
}
@@ -234,13 +234,13 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
Flags |= FD_CLOEXEC;
if (fcntl(pPipe->m_Socket, F_SETFD, Flags) == -1)
{
- SAL_WARN("osl.pipe", "fcntl() failed: " << strerror(errno));
+ SAL_WARN("sal.osl.pipe", "fcntl() failed: " << strerror(errno));
}
}
memset(&addr, 0, sizeof(addr));
- SAL_INFO("osl.pipe", "new pipe on fd " << pPipe->m_Socket << " '" << name << "'");
+ SAL_INFO("sal.osl.pipe", "new pipe on fd " << pPipe->m_Socket << " '" << name << "'");
addr.sun_family = AF_UNIX;
strncpy(addr.sun_path, name, sizeof(addr.sun_path) - 1);
@@ -260,7 +260,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
{
if ( connect(pPipe->m_Socket, reinterpret_cast<sockaddr *>(&addr), len) >= 0 )
{
- SAL_WARN("osl.pipe", "connect() failed: " << strerror(errno));
+ SAL_WARN("sal.osl.pipe", "connect() failed: " << strerror(errno));
close (pPipe->m_Socket);
__osl_destroyPipeImpl(pPipe);
return NULL;
@@ -272,7 +272,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
/* ok, fs clean */
if ( bind(pPipe->m_Socket, reinterpret_cast<sockaddr *>(&addr), len) < 0 )
{
- SAL_WARN("osl.pipe", "bind() failed: " << strerror(errno));
+ SAL_WARN("sal.osl.pipe", "bind() failed: " << strerror(errno));
close (pPipe->m_Socket);
__osl_destroyPipeImpl(pPipe);
return NULL;
@@ -288,7 +288,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
if ( listen(pPipe->m_Socket, 5) < 0 )
{
- SAL_WARN("osl.pipe", "listen() failed: " << strerror(errno));
+ SAL_WARN("sal.osl.pipe", "listen() failed: " << strerror(errno));
// coverity[toctou] cid#1255391 warns about unlink(name) after
// stat(name, &status) above, but the intervening call to bind makes
// those two clearly unrelated, as it would fail if name existed at
@@ -310,7 +310,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
return (pPipe);
}
- SAL_WARN("osl.pipe", "connect() failed: " << strerror(errno));
+ SAL_WARN("sal.osl.pipe", "connect() failed: " << strerror(errno));
}
close (pPipe->m_Socket);
@@ -370,12 +370,12 @@ void SAL_CALL osl_closePipe( oslPipe pPipe )
int fd = socket(AF_UNIX, SOCK_STREAM, 0);
if ( fd < 0 )
{
- SAL_WARN("osl.pipe", "socket() failed: " << strerror(errno));
+ SAL_WARN("sal.osl.pipe", "socket() failed: " << strerror(errno));
return;
}
memset(&addr, 0, sizeof(addr));
- SAL_INFO("osl.pipe", "osl_destroyPipe : Pipe Name '" << pPipe->m_Name << "'");
+ SAL_INFO("sal.osl.pipe", "osl_destroyPipe : Pipe Name '" << pPipe->m_Name << "'");
addr.sun_family = AF_UNIX;
strncpy(addr.sun_path, pPipe->m_Name, sizeof(addr.sun_path) - 1);
@@ -384,7 +384,7 @@ void SAL_CALL osl_closePipe( oslPipe pPipe )
nRet = connect( fd, reinterpret_cast<sockaddr *>(&addr), len);
if ( nRet < 0 )
{
- SAL_WARN("osl.pipe", "connect() failed: " << strerror(errno));
+ SAL_WARN("sal.osl.pipe", "connect() failed: " << strerror(errno));
}
close(fd);
}
@@ -393,13 +393,13 @@ void SAL_CALL osl_closePipe( oslPipe pPipe )
nRet = shutdown(ConnFD, 2);
if ( nRet < 0 )
{
- SAL_WARN("osl.pipe", "shutdown() failed: " << strerror(errno));
+ SAL_WARN("sal.osl.pipe", "shutdown() failed: " << strerror(errno));
}
nRet = close(ConnFD);
if ( nRet < 0 )
{
- SAL_WARN("osl.pipe", "close() failed: " << strerror(errno));
+ SAL_WARN("sal.osl.pipe", "close() failed: " << strerror(errno));
}
/* remove filesystem entry */
if ( strlen(pPipe->m_Name) > 0 )
@@ -434,7 +434,7 @@ oslPipe SAL_CALL osl_acceptPipe(oslPipe pPipe)
if (s < 0)
{
- SAL_WARN("osl.pipe", "accept() failed: " << strerror(errno));
+ SAL_WARN("sal.osl.pipe", "accept() failed: " << strerror(errno));
return NULL;
}
@@ -464,7 +464,7 @@ oslPipe SAL_CALL osl_acceptPipe(oslPipe pPipe)
flags |= FD_CLOEXEC;
if (fcntl(s, F_SETFD, flags) < 0)
{
- SAL_WARN("osl.pipe", "fcntl() failed: " << strerror(errno));
+ SAL_WARN("sal.osl.pipe", "fcntl() failed: " << strerror(errno));
}
}
@@ -484,7 +484,7 @@ sal_Int32 SAL_CALL osl_receivePipe(oslPipe pPipe,
if ( pPipe == 0 )
{
- SAL_WARN("osl.pipe", "osl_receivePipe: Invalid socket");
+ SAL_WARN("sal.osl.pipe", "osl_receivePipe: Invalid socket");
errno=EINVAL;
return -1;
}
@@ -495,7 +495,7 @@ sal_Int32 SAL_CALL osl_receivePipe(oslPipe pPipe,
if ( nRet < 0 )
{
- SAL_WARN("osl.pipe", "recv() failed: " << strerror(errno));
+ SAL_WARN("sal.osl.pipe", "recv() failed: " << strerror(errno));
}
return nRet;
@@ -511,7 +511,7 @@ sal_Int32 SAL_CALL osl_sendPipe(oslPipe pPipe,
if ( pPipe == 0 )
{
- SAL_WARN("osl.pipe", "osl_sendPipe: Invalid socket");
+ SAL_WARN("sal.osl.pipe", "osl_sendPipe: Invalid socket");
errno=EINVAL;
return -1;
}
@@ -522,7 +522,7 @@ sal_Int32 SAL_CALL osl_sendPipe(oslPipe pPipe,
if ( nRet <= 0 )
{
- SAL_WARN("osl.pipe", "send() failed: " << strerror(errno));
+ SAL_WARN("sal.osl.pipe", "send() failed: " << strerror(errno));
}
return nRet;
commit d6dd209355ce0016b10dcebc61cdebdefe48229b
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Feb 3 13:55:52 2015 +0100
Let's use log tags starting with "sal" here in sal
Change-Id: I89e71e03ede5175fabe1df949b8d3200f64757a0
diff --git a/sal/osl/unx/conditn.cxx b/sal/osl/unx/conditn.cxx
index 42aa05e..f5fedd4 100644
--- a/sal/osl/unx/conditn.cxx
+++ b/sal/osl/unx/conditn.cxx
@@ -53,7 +53,7 @@ oslCondition SAL_CALL osl_createCondition()
nRet = pthread_cond_init(&pCond->m_Condition, PTHREAD_CONDATTR_DEFAULT);
if ( nRet != 0 )
{
- SAL_WARN( "osl.condition", "pthread_cond_init failed: " << strerror(nRet) );
+ SAL_WARN( "sal.osl.condition", "pthread_cond_init failed: " << strerror(nRet) );
free(pCond);
return 0;
@@ -62,16 +62,16 @@ oslCondition SAL_CALL osl_createCondition()
nRet = pthread_mutex_init(&pCond->m_Lock, PTHREAD_MUTEXATTR_DEFAULT);
if ( nRet != 0 )
{
- SAL_WARN( "osl.condition", "pthread_mutex_init failed: " << strerror(nRet) );
+ SAL_WARN( "sal.osl.condition", "pthread_mutex_init failed: " << strerror(nRet) );
nRet = pthread_cond_destroy(&pCond->m_Condition);
- SAL_WARN_IF( nRet != 0, "osl.condition", "pthread_cond_destroy failed: " << strerror(nRet) );
+ SAL_WARN_IF( nRet != 0, "sal.osl.condition", "pthread_cond_destroy failed: " << strerror(nRet) );
free(pCond);
pCond = 0;
}
- SAL_INFO( "osl.condition", "osl_createCondition(): " << pCond );
+ SAL_INFO( "sal.osl.condition", "osl_createCondition(): " << pCond );
return (oslCondition)pCond;
}
@@ -82,14 +82,14 @@ void SAL_CALL osl_destroyCondition(oslCondition Condition)
pCond = (oslConditionImpl*)Condition;
- SAL_INFO( "osl.condition", "osl_destroyCondition(" << pCond << ")" );
+ SAL_INFO( "sal.osl.condition", "osl_destroyCondition(" << pCond << ")" );
if ( pCond )
{
int nRet = pthread_cond_destroy(&pCond->m_Condition);
- SAL_WARN_IF( nRet != 0, "osl.condition", "pthread_cond_destroy failed: " << strerror(nRet) );
+ SAL_WARN_IF( nRet != 0, "sal.osl.condition", "pthread_cond_destroy failed: " << strerror(nRet) );
nRet = pthread_mutex_destroy(&pCond->m_Lock);
- SAL_WARN_IF( nRet != 0, "osl.condition", "pthread_mutex_destroy failed: " << strerror(nRet) );
+ SAL_WARN_IF( nRet != 0, "sal.osl.condition", "pthread_mutex_destroy failed: " << strerror(nRet) );
free(Condition);
}
@@ -113,7 +113,7 @@ sal_Bool SAL_CALL osl_setCondition(oslCondition Condition)
nRet = pthread_mutex_lock(&pCond->m_Lock);
if ( nRet != 0 )
{
- SAL_WARN( "osl.condition", "osl_setCondition(" << pCond << "): pthread_mutex_lock failed: " << strerror(nRet) );
+ SAL_WARN( "sal.osl.condition", "osl_setCondition(" << pCond << "): pthread_mutex_lock failed: " << strerror(nRet) );
return sal_False;
}
@@ -121,7 +121,7 @@ sal_Bool SAL_CALL osl_setCondition(oslCondition Condition)
nRet = pthread_cond_broadcast(&pCond->m_Condition);
if ( nRet != 0 )
{
- SAL_WARN( "osl.condition", "osl_setCondition(" << pCond << "): pthread_cond_broadcast failed: " << strerror(nRet) );
+ SAL_WARN( "sal.osl.condition", "osl_setCondition(" << pCond << "): pthread_cond_broadcast failed: " << strerror(nRet) );
// try to unlock the mutex
pthread_mutex_unlock(&pCond->m_Lock);
return sal_False;
@@ -130,11 +130,11 @@ sal_Bool SAL_CALL osl_setCondition(oslCondition Condition)
nRet = pthread_mutex_unlock(&pCond->m_Lock);
if ( nRet != 0 )
{
- SAL_WARN( "osl.condition", "osl_setCondition(" << pCond << "): pthread_mutex_unlock failed: " << strerror(nRet) );
+ SAL_WARN( "sal.osl.condition", "osl_setCondition(" << pCond << "): pthread_mutex_unlock failed: " << strerror(nRet) );
return sal_False;
}
- SAL_INFO( "osl.condition", "osl_setCondition(" << pCond << ")" );
+ SAL_INFO( "sal.osl.condition", "osl_setCondition(" << pCond << ")" );
return sal_True;
@@ -157,7 +157,7 @@ sal_Bool SAL_CALL osl_resetCondition(oslCondition Condition)
nRet = pthread_mutex_lock(&pCond->m_Lock);
if ( nRet != 0 )
{
- SAL_WARN( "osl.condition", "osl_resetCondition(" << pCond << "): pthread_mutex_lock failed: " << strerror(nRet) );
+ SAL_WARN( "sal.osl.condition", "osl_resetCondition(" << pCond << "): pthread_mutex_lock failed: " << strerror(nRet) );
return sal_False;
}
@@ -166,11 +166,11 @@ sal_Bool SAL_CALL osl_resetCondition(oslCondition Condition)
nRet = pthread_mutex_unlock(&pCond->m_Lock);
if ( nRet != 0 )
{
- SAL_WARN( "osl.condition", "osl_resetCondition(" << pCond << "): pthread_mutex_unlock failed: " << strerror(nRet) );
+ SAL_WARN( "sal.osl.condition", "osl_resetCondition(" << pCond << "): pthread_mutex_unlock failed: " << strerror(nRet) );
return sal_False;
}
- SAL_INFO( "osl.condition", "osl_resetCondition(" << pCond << ")" );
+ SAL_INFO( "sal.osl.condition", "osl_resetCondition(" << pCond << ")" );
return sal_True;
}
@@ -184,7 +184,7 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const Time
assert(Condition);
pCond = (oslConditionImpl*)Condition;
- SAL_INFO( "osl.condition", "osl_waitCondition(" << pCond << ")" );
+ SAL_INFO( "sal.osl.condition", "osl_waitCondition(" << pCond << ")" );
if ( pCond == 0 )
{
@@ -194,7 +194,7 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const Time
nRet = pthread_mutex_lock(&pCond->m_Lock);
if ( nRet != 0 )
{
- SAL_WARN( "osl.condition", "osl_waitCondition(" << pCond << "): pthread_mutex_lock failed: " << strerror(nRet) );
+ SAL_WARN( "sal.osl.condition", "osl_waitCondition(" << pCond << "): pthread_mutex_lock failed: " << strerror(nRet) );
return osl_cond_result_error;
}
@@ -220,7 +220,7 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const Time
{
Result = osl_cond_result_timeout;
nRet = pthread_mutex_unlock(&pCond->m_Lock);
- SAL_WARN_IF( nRet != 0, "osl.condition", "osl_waitCondition(" << pCond << "): pthread_mutex_unlock failed: " << strerror(nRet) );
+ SAL_WARN_IF( nRet != 0, "sal.osl.condition", "osl_waitCondition(" << pCond << "): pthread_mutex_unlock failed: " << strerror(nRet) );
return Result;
}
@@ -228,7 +228,7 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const Time
{
Result = osl_cond_result_error;
nRet = pthread_mutex_unlock(&pCond->m_Lock);
- SAL_WARN_IF( nRet != 0, "osl.condition", "osl_waitCondition(" << pCond << "): pthread_mutex_unlock failed: " << strerror(nRet) );
+ SAL_WARN_IF( nRet != 0, "sal.osl.condition", "osl_waitCondition(" << pCond << "): pthread_mutex_unlock failed: " << strerror(nRet) );
return Result;
}
}
@@ -243,10 +243,10 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const Time
nRet = pthread_cond_wait(&pCond->m_Condition, &pCond->m_Lock);
if ( nRet != 0 )
{
- SAL_WARN( "osl.condition", "osl_waitCondition(" << pCond << "): pthread_cond_wait failed: " << strerror(nRet) );
+ SAL_WARN( "sal.osl.condition", "osl_waitCondition(" << pCond << "): pthread_cond_wait failed: " << strerror(nRet) );
Result = osl_cond_result_error;
nRet = pthread_mutex_unlock(&pCond->m_Lock);
- SAL_WARN_IF( nRet != 0, "osl.condition", "osl_waitCondition(" << pCond << "): pthread_mutex_unlock failed: " << strerror(nRet) );
+ SAL_WARN_IF( nRet != 0, "sal.osl.condition", "osl_waitCondition(" << pCond << "): pthread_mutex_unlock failed: " << strerror(nRet) );
return Result;
}
@@ -254,9 +254,9 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const Time
}
nRet = pthread_mutex_unlock(&pCond->m_Lock);
- SAL_WARN_IF( nRet != 0, "osl.condition", "osl_waitCondition(" << pCond << "): pthread_mutex_unlock failed: " << strerror(nRet) );
+ SAL_WARN_IF( nRet != 0, "sal.osl.condition", "osl_waitCondition(" << pCond << "): pthread_mutex_unlock failed: " << strerror(nRet) );
- SAL_INFO( "osl.condition", "osl_waitCondition(" << pCond << "): " << (Result == osl_cond_result_ok ? "OK" : "ERROR") );
+ SAL_INFO( "sal.osl.condition", "osl_waitCondition(" << pCond << "): " << (Result == osl_cond_result_ok ? "OK" : "ERROR") );
return Result;
}
@@ -276,14 +276,14 @@ sal_Bool SAL_CALL osl_checkCondition(oslCondition Condition)
}
nRet = pthread_mutex_lock(&pCond->m_Lock);
- SAL_WARN_IF( nRet != 0, "osl.condition", "osl_checkCondition(" << pCond << "): pthread_mutex_lock failed: " << strerror(nRet) );
+ SAL_WARN_IF( nRet != 0, "sal.osl.condition", "osl_checkCondition(" << pCond << "): pthread_mutex_lock failed: " << strerror(nRet) );
State = pCond->m_State;
nRet = pthread_mutex_unlock(&pCond->m_Lock);
- SAL_WARN_IF( nRet != 0, "osl.condition", "osl_checkCondition(" << pCond << "): pthread_mutex_unlock failed: " << strerror(nRet) );
+ SAL_WARN_IF( nRet != 0, "sal.osl.condition", "osl_checkCondition(" << pCond << "): pthread_mutex_unlock failed: " << strerror(nRet) );
- SAL_INFO( "osl.condition", "osl_checkCondition(" << pCond << "): " << (State ? "YES" : "NO") );
+ SAL_INFO( "sal.osl.condition", "osl_checkCondition(" << pCond << "): " << (State ? "YES" : "NO") );
return State;
}
More information about the Libreoffice-commits
mailing list