[Libreoffice-commits] core.git: 3 commits - sal/osl sal/textenc
Tor Lillqvist
tml at iki.fi
Wed Jun 19 05:56:54 PDT 2013
sal/osl/all/log.cxx | 3 +++
sal/osl/unx/file.cxx | 4 ++--
sal/textenc/tencinfo.cxx | 1 -
3 files changed, 5 insertions(+), 3 deletions(-)
New commits:
commit a1936e4183240981af0bf616207994e3a2f7929e
Author: Tor Lillqvist <tml at iki.fi>
Date: Wed Jun 19 11:35:00 2013 +0300
Fix warning: Value stored is never read
Change-Id: Ic41fe1682f19c39faa0a2afc47c11b8a5bead212
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 7a991e8..4e646b0 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -461,7 +461,7 @@ oslFileError FileHandle_Impl::readFileAt (
if (result != osl_File_E_None)
return (result);
- nBytesRequested -= uDone, *pBytesRead += uDone;
+ *pBytesRead += uDone;
return osl_File_E_None;
}
@@ -533,7 +533,7 @@ oslFileError FileHandle_Impl::writeFileAt (
if (uDone != nBytesToWrite)
return osl_File_E_IO;
- nBytesToWrite -= uDone, *pBytesWritten += uDone;
+ *pBytesWritten += uDone;
return osl_File_E_None;
}
commit ec13a7bdbf904092df066a52ccb03fda12b4bed3
Author: Tor Lillqvist <tml at iki.fi>
Date: Wed Jun 19 11:26:44 2013 +0300
Fix warning: Value stored to 'eEncoding' is never read
eEncoding is assigned again a few lines below.
Change-Id: Ib475095bab30e0c2f066934a10cda650706c2c8a
diff --git a/sal/textenc/tencinfo.cxx b/sal/textenc/tencinfo.cxx
index 0bcadb7..ded6bc5 100644
--- a/sal/textenc/tencinfo.cxx
+++ b/sal/textenc/tencinfo.cxx
@@ -448,7 +448,6 @@ rtl_TextEncoding SAL_CALL rtl_getTextEncodingFromUnixCharset( const char* pUnixC
{
if ( Impl_matchString( pSecondPart, pData->mpCharsetStr ) )
{
- eEncoding = pData->meTextEncoding;
break;
}
commit f5000d66bac505572a91f2bc391ecc23bd1ee670
Author: Tor Lillqvist <tml at iki.fi>
Date: Wed Jun 19 11:13:20 2013 +0300
Add missing break statements
Found by Clang static analyzer: Value stored to 'prio' is never read.
Change-Id: I7c0e90e5435b028f0a4b4bded304338cb57271cc
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index db5dc7b..3a496b8 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -225,13 +225,16 @@ void log(
switch (level) {
case SAL_DETAIL_LOG_LEVEL_INFO:
prio = LOG_INFO;
+ break;
default:
assert(false); // this cannot happen
// fall through
case SAL_DETAIL_LOG_LEVEL_WARN:
prio = LOG_WARNING;
+ break;
case SAL_DETAIL_LOG_LEVEL_DEBUG:
prio = LOG_DEBUG;
+ break;
}
syslog(prio, "%s", s.str().c_str());
#endif
More information about the Libreoffice-commits
mailing list