[Libreoffice-commits] .: 3 commits - codemaker/source cppu/qa idlc/source sal/osl
Thomas Arnhold
tarnhold at kemper.freedesktop.org
Sat Jan 29 06:39:32 PST 2011
codemaker/source/cppumaker/includes.hxx | 22 ++--------------------
codemaker/source/javamaker/classfile.hxx | 25 -------------------------
cppu/qa/test_any.cxx | 20 --------------------
idlc/source/idlccompile.cxx | 3 ++-
sal/osl/w32/profile.cxx | 12 +-----------
5 files changed, 5 insertions(+), 77 deletions(-)
New commits:
commit e02d516c739ce70aff7b4a1469cad7a63ab0dc98
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri Jan 28 23:45:51 2011 +0100
Use errno to get the correct error message if mkstemp() fails.
diff --git a/idlc/source/idlccompile.cxx b/idlc/source/idlccompile.cxx
index 8453a3e..b336c62 100644
--- a/idlc/source/idlccompile.cxx
+++ b/idlc/source/idlccompile.cxx
@@ -41,6 +41,7 @@
#endif
#ifdef SAL_UNX
+#include <errno.h>
#include <unistd.h>
#if defined(MACOSX) || defined(FREEBSD) || defined(NETBSD) || \
defined(AIX) || defined(OPENBSD)
@@ -168,7 +169,7 @@ OString makeTempName(const OString& prefix)
int nDescriptor = mkstemp(tmpFilePattern);
if( -1 == nDescriptor )
{
- fprintf( stderr,"idlc: couldn't create temporary file\n" );
+ fprintf(stderr, "idlc: mkstemp(\"%s\") failed: %s\n", tmpFilePattern, strerror(errno));
exit( 1 );
}
// the file shall later be reopened by stdio functions
commit 9b94be0be22fb748834d00740bb964804bdef518
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri Jan 28 23:41:52 2011 +0100
cppcheck: remove unused variable strLen.
diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx
index 6887424..f06c417 100644
--- a/sal/osl/w32/profile.cxx
+++ b/sal/osl/w32/profile.cxx
@@ -1503,10 +1503,6 @@ static sal_Bool putLine(osl_TFile* pFile, const sal_Char *pszLine)
{
unsigned int Len = strlen(pszLine);
-#ifdef DEBUG_OSL_PROFILE
- int strLen=0;
-#endif
-
if ( pFile == 0 || pFile->m_Handle < 0 )
{
return (sal_False);
@@ -1539,19 +1535,13 @@ static sal_Bool putLine(osl_TFile* pFile, const sal_Char *pszLine)
memcpy(pFile->m_pWriteBuf + ( pFile->m_nWriteBufLen - pFile->m_nWriteBufFree ),pszLine,Len+1);
-#ifdef DEBUG_OSL_PROFILE
- strLen = strlen(pFile->m_pWriteBuf);
-#endif
+
pFile->m_pWriteBuf[pFile->m_nWriteBufLen - pFile->m_nWriteBufFree + Len]='\r';
pFile->m_pWriteBuf[pFile->m_nWriteBufLen - pFile->m_nWriteBufFree + Len + 1]='\n';
pFile->m_pWriteBuf[pFile->m_nWriteBufLen - pFile->m_nWriteBufFree + Len + 2]='\0';
pFile->m_nWriteBufFree-=Len+2;
-#ifdef DEBUG_OSL_PROFILE
-/* OSL_TRACE("File Buffer in _putLine '%s' '%i'(%i)\n",pFile->m_pWriteBuf,strlen(pFile->m_pWriteBuf),pFile->m_nWriteBufLen - pFile->m_nWriteBufFree);*/
-#endif
-
return (sal_True);
}
commit 99c12e49c0093478f66e44867ef3a93435b92267
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri Jan 28 23:41:08 2011 +0100
Remove double line spacing and correct indentation
diff --git a/codemaker/source/cppumaker/includes.hxx b/codemaker/source/cppumaker/includes.hxx
index 2a24456..3d209bf 100644
--- a/codemaker/source/cppumaker/includes.hxx
+++ b/codemaker/source/cppumaker/includes.hxx
@@ -46,43 +46,25 @@ public:
~Includes();
void add(rtl::OString const & registryType);
-
void addAny() { m_includeAny = true; }
-
void addReference() { m_includeReference = true; }
-
void addSequence() { m_includeSequence = true; }
-
void addType() { m_includeType = true; }
-
void addCppuMacrosHxx() { m_includeCppuMacrosHxx = true; }
-
void addCppuUnotypeHxx() { m_includeCppuUnotypeHxx = true; }
-
void addOslDoublecheckedlockingH()
- { m_includeOslDoublecheckedlockingH = true; }
-
+ { m_includeOslDoublecheckedlockingH = true; }
void addOslMutexHxx() { m_includeOslMutexHxx = true; }
-
void addRtlStrbufHxx() { m_includeRtlStrbufHxx = true; }
-
void addRtlStringH() { m_includeRtlStringH = true; }
-
void addRtlTextencH() { m_includeRtlTextencH = true; }
-
void addRtlUstrbufHxx() { m_includeRtlUstrbufHxx = true; }
-
void addRtlUstringH() { m_includeRtlUstringH = true; }
-
void addRtlUstringHxx() { m_includeRtlUstringHxx = true; }
-
void addSalTypesH() { m_includeSalTypesH = true; }
-
void addTypelibTypeclassH() { m_includeTypelibTypeclassH = true; }
-
void addTypelibTypedescriptionH()
- { m_includeTypelibTypedescriptionH = true; }
-
+ { m_includeTypelibTypedescriptionH = true; }
void dump(FileStream & out, rtl::OString const * companionHdl);
static void dumpInclude(
diff --git a/codemaker/source/javamaker/classfile.hxx b/codemaker/source/javamaker/classfile.hxx
index 72a5d05..33b7a9c 100644
--- a/codemaker/source/javamaker/classfile.hxx
+++ b/codemaker/source/javamaker/classfile.hxx
@@ -64,17 +64,11 @@ public:
~Code();
void instrAastore();
-
void instrAconstNull();
-
void instrAnewarray(rtl::OString const & type);
-
void instrAreturn();
-
void instrAthrow();
-
void instrCheckcast(rtl::OString const & type);
-
void instrDup();
void instrGetstatic(
@@ -82,9 +76,7 @@ public:
rtl::OString const & descriptor);
Branch instrIfAcmpne();
-
Branch instrIfeq();
-
Branch instrIfnull();
void instrInstanceof(rtl::OString const & type);
@@ -110,9 +102,7 @@ public:
std::list< std::pair< sal_Int32, Code * > > const & blocks);
void instrNew(rtl::OString const & type);
-
void instrNewarray(codemaker::UnoType::Sort sort);
-
void instrPop();
void instrPutfield(
@@ -124,7 +114,6 @@ public:
rtl::OString const & descriptor);
void instrReturn();
-
void instrSwap();
void instrTableswitch(
@@ -132,21 +121,13 @@ public:
std::list< Code * > const & blocks);
void loadIntegerConstant(sal_Int32 value);
-
void loadStringConstant(rtl::OString const & value);
-
void loadLocalInteger(sal_uInt16 index);
-
void loadLocalLong(sal_uInt16 index);
-
void loadLocalFloat(sal_uInt16 index);
-
void loadLocalDouble(sal_uInt16 index);
-
void loadLocalReference(sal_uInt16 index);
-
void storeLocalReference(sal_uInt16 index);
-
void branchHere(Branch branch);
void addException(
@@ -188,11 +169,8 @@ public:
Code * newCode();
sal_uInt16 addIntegerInfo(sal_Int32 value);
-
sal_uInt16 addFloatInfo(float value);
-
sal_uInt16 addLongInfo(sal_Int64 value);
-
sal_uInt16 addDoubleInfo(double value);
void addInterface(rtl::OString const & interface);
@@ -217,11 +195,8 @@ private:
void operator =(ClassFile); // not implemented
sal_uInt16 nextConstantPoolIndex(sal_uInt16 width);
-
sal_uInt16 addUtf8Info(rtl::OString const & value);
-
sal_uInt16 addClassInfo(rtl::OString const & type);
-
sal_uInt16 addStringInfo(rtl::OString const & value);
sal_uInt16 addFieldrefInfo(
diff --git a/cppu/qa/test_any.cxx b/cppu/qa/test_any.cxx
index 3d62d89..c67ce6c 100644
--- a/cppu/qa/test_any.cxx
+++ b/cppu/qa/test_any.cxx
@@ -205,45 +205,25 @@ public:
class Test: public CppUnit::TestFixture {
public:
void testVoid();
-
void testBoolean();
-
void testByte();
-
void testShort();
-
void testUnsignedShort();
-
void testLong();
-
void testUnsignedLong();
-
void testHyper();
-
void testUnsignedHyper();
-
void testFloat();
-
void testDouble();
-
void testChar();
-
void testString();
-
void testType();
-
void testSequence();
-
void testEnum();
-
void testStruct();
-
void testPoly();
-
void testException();
-
void testInterface();
-
void testNull();
CPPUNIT_TEST_SUITE(Test);
More information about the Libreoffice-commits
mailing list