summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/random.cxx2
-rw-r--r--sal/textenc/tcvtmb.cxx3
2 files changed, 2 insertions, 3 deletions
diff --git a/sal/osl/unx/random.cxx b/sal/osl/unx/random.cxx
index 04333a2f3b2b..a0fb73c92867 100644
--- a/sal/osl/unx/random.cxx
+++ b/sal/osl/unx/random.cxx
@@ -14,7 +14,6 @@
int osl_get_system_random_data(char* buffer, size_t desired_len)
{
- ssize_t nb_read;
int fd;
assert(buffer);
@@ -23,6 +22,7 @@ int osl_get_system_random_data(char* buffer, size_t desired_len)
{
while(desired_len)
{
+ ssize_t nb_read;
if ((nb_read = read(fd, buffer, desired_len)) == -1)
{
if (errno != EINTR)
diff --git a/sal/textenc/tcvtmb.cxx b/sal/textenc/tcvtmb.cxx
index 75e5b7f12862..cce84c19dbed 100644
--- a/sal/textenc/tcvtmb.cxx
+++ b/sal/textenc/tcvtmb.cxx
@@ -40,7 +40,6 @@ sal_Size ImplDBCSToUnicode( const void* pData, SAL_UNUSED_PARAMETER void*,
sal_uInt32 nFlags, sal_uInt32* pInfo,
sal_Size* pSrcCvtBytes )
{
- unsigned char cLead;
unsigned char cTrail;
sal_Unicode cConv;
const ImplDBCSToUniLeadTab* pLeadEntry;
@@ -54,7 +53,7 @@ sal_Size ImplDBCSToUnicode( const void* pData, SAL_UNUSED_PARAMETER void*,
pEndSrcBuf = pSrcBuf+nSrcBytes;
while ( pSrcBuf < pEndSrcBuf )
{
- cLead = (unsigned char)*pSrcBuf;
+ unsigned char cLead = (unsigned char)*pSrcBuf;
/* get entry for the lead byte */
pLeadEntry = pLeadTab+cLead;