summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx17
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx17
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx17
-rw-r--r--codemaker/source/commoncpp/commoncpp.cxx2
-rw-r--r--codemaker/source/javamaker/javatype.cxx20
-rw-r--r--cppuhelper/source/propshlp.cxx6
-rw-r--r--cppuhelper/source/unourl.cxx6
-rw-r--r--pyuno/source/module/pyuno_module.cxx2
-rw-r--r--sal/rtl/source/uri.cxx27
-rw-r--r--stoc/source/javavm/javavm.cxx14
-rw-r--r--stoc/source/uriproc/UriReferenceFactory.cxx4
-rw-r--r--stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx2
12 files changed, 79 insertions, 55 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx
index 769f379a0f5f..92b6a2ce3ab2 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx
@@ -643,16 +643,17 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal
}
-
-#define MIN_LINE_SIZE 32
-
void bridges::cpp_uno::shared::VtableFactory::flushCode(unsigned char const * bptr, unsigned char const * eptr)
{
- unsigned char * eaddr = (unsigned char *) eptr + MIN_LINE_SIZE + 1;
- for ( unsigned char * addr = (unsigned char *) bptr; addr < eaddr; addr += MIN_LINE_SIZE) {
- __asm__ volatile ( "dcbf 0,%0;" "icbi 0,%0;" : : "r"(addr) : "memory");
- }
- __asm__ volatile ( "sync;" "isync;" : : : "memory");
+ int const lineSize = 32;
+ for (unsigned char const * p = bptr; p < eptr + lineSize; p += lineSize) {
+ __asm__ volatile ("dcbst 0, %0" : : "r"(p) : "memory");
+ }
+ __asm__ volatile ("sync" : : : "memory");
+ for (unsigned char const * p = bptr; p < eptr + lineSize; p += lineSize) {
+ __asm__ volatile ("icbi 0, %0" : : "r"(p) : "memory");
+ }
+ __asm__ volatile ("isync" : : : "memory");
}
struct bridges::cpp_uno::shared::VtableFactory::Slot { void * fn; };
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
index 740301d1bf49..600ca1a3ebb6 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
@@ -629,16 +629,17 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 nFunctionIndex, sa
}
-
-#define MIN_LINE_SIZE 32
-
void bridges::cpp_uno::shared::VtableFactory::flushCode(unsigned char const * bptr, unsigned char const * eptr)
{
- unsigned char * eaddr = (unsigned char *) eptr + MIN_LINE_SIZE + 1;
- for ( unsigned char * addr = (unsigned char *) bptr; addr < eaddr; addr += MIN_LINE_SIZE) {
- __asm__ volatile ( "dcbf 0,%0;" "icbi 0,%0;" : : "r"(addr) : "memory");
- }
- __asm__ volatile ( "sync;" "isync;" : : : "memory");
+ int const lineSize = 32;
+ for (unsigned char const * p = bptr; p < eptr + lineSize; p += lineSize) {
+ __asm__ volatile ("dcbst 0, %0" : : "r"(p) : "memory");
+ }
+ __asm__ volatile ("sync" : : : "memory");
+ for (unsigned char const * p = bptr; p < eptr + lineSize; p += lineSize) {
+ __asm__ volatile ("icbi 0, %0" : : "r"(p) : "memory");
+ }
+ __asm__ volatile ("isync" : : : "memory");
}
struct bridges::cpp_uno::shared::VtableFactory::Slot { void * fn; };
diff --git a/bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx
index b18dde91cddb..fa5aa958f979 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx
@@ -638,16 +638,17 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex,
}
-
-#define MIN_LINE_SIZE 32
-
void bridges::cpp_uno::shared::VtableFactory::flushCode(unsigned char const * bptr, unsigned char const * eptr)
{
- unsigned char * eaddr = (unsigned char *) eptr + MIN_LINE_SIZE + 1;
- for ( unsigned char * addr = (unsigned char *) bptr; addr < eaddr; addr += MIN_LINE_SIZE) {
- __asm__ volatile ( "dcbf 0,%0;" "icbi 0,%0;" : : "r"(addr) : "memory");
- }
- __asm__ volatile ( "sync;" "isync;" : : : "memory");
+ int const lineSize = 32;
+ for (unsigned char const * p = bptr; p < eptr + lineSize; p += lineSize) {
+ __asm__ volatile ("dcbst 0, %0" : : "r"(p) : "memory");
+ }
+ __asm__ volatile ("sync" : : : "memory");
+ for (unsigned char const * p = bptr; p < eptr + lineSize; p += lineSize) {
+ __asm__ volatile ("icbi 0, %0" : : "r"(p) : "memory");
+ }
+ __asm__ volatile ("isync" : : : "memory");
}
struct bridges::cpp_uno::shared::VtableFactory::Slot { void * fn; };
diff --git a/codemaker/source/commoncpp/commoncpp.cxx b/codemaker/source/commoncpp/commoncpp.cxx
index 2c605cd68f0e..9d1de754a2ee 100644
--- a/codemaker/source/commoncpp/commoncpp.cxx
+++ b/codemaker/source/commoncpp/commoncpp.cxx
@@ -344,7 +344,7 @@ rtl::OString translateUnoToCppIdentifier(
|| unoIdentifier == "std"))
// Others:
|| unoIdentifier == "NDEBUG"
- || forbidden != 0 && unoIdentifier == *forbidden)
+ || (forbidden != 0 && unoIdentifier == *forbidden) )
{
rtl::OStringBuffer buf(prefix);
buf.append('_');
diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx
index ea929455eccc..b168cf2cd216 100644
--- a/codemaker/source/javamaker/javatype.cxx
+++ b/codemaker/source/javamaker/javatype.cxx
@@ -1768,8 +1768,10 @@ void addBaseArguments(
}
firstField = 1;
} else {
- if (typeClass == RT_TYPE_STRUCT && (superTypes > 1 || fields == 0)
- || typeClass == RT_TYPE_EXCEPTION && superTypes != 1)
+ if (
+ (typeClass == RT_TYPE_STRUCT && (superTypes > 1 || fields == 0)) ||
+ (typeClass == RT_TYPE_EXCEPTION && superTypes != 1)
+ )
{
throw CannotDumpException(
rtl::OString(
@@ -1871,10 +1873,16 @@ void handleAggregatingType(
RTL_CONSTASCII_STRINGPARAM("java/lang/RuntimeException"));
runtimeException = true;
} else {
- if ((typeClass == RT_TYPE_STRUCT
- && (fields == 0
- || (references == 0 ? superTypes > 1 : superTypes != 0)))
- || typeClass == RT_TYPE_EXCEPTION && superTypes != 1)
+ if (
+ (
+ typeClass == RT_TYPE_STRUCT &&
+ (
+ fields == 0 ||
+ (references == 0 ? superTypes > 1 : superTypes != 0)
+ )
+ ) ||
+ (typeClass == RT_TYPE_EXCEPTION && superTypes != 1)
+ )
{
throw CannotDumpException(
rtl::OString(
diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx
index 0a1e0ba3f33c..9847ba2979c3 100644
--- a/cppuhelper/source/propshlp.cxx
+++ b/cppuhelper/source/propshlp.cxx
@@ -559,8 +559,10 @@ void OPropertySetHelper::fire
OUString aPropName;
rInfo.fillPropertyMembersByHandle( &aPropName, &nAttributes, pnHandles[i] );
- if( bVetoable && (nAttributes & PropertyAttribute::CONSTRAINED)
- || !bVetoable && (nAttributes & PropertyAttribute::BOUND) )
+ if(
+ (bVetoable && (nAttributes & PropertyAttribute::CONSTRAINED)) ||
+ (!bVetoable && (nAttributes & PropertyAttribute::BOUND))
+ )
{
pEvts[nChangesLen].Source = xSource;
pEvts[nChangesLen].PropertyName = aPropName;
diff --git a/cppuhelper/source/unourl.cxx b/cppuhelper/source/unourl.cxx
index c8a427681526..8820b38c1144 100644
--- a/cppuhelper/source/unourl.cxx
+++ b/cppuhelper/source/unourl.cxx
@@ -52,9 +52,9 @@ namespace {
inline bool isAlphanum(sal_Unicode c)
{
- return c >= 0x30 && c <= 0x39 // '0'--'9'
- || c >= 0x41 && c <= 0x5A // 'A'--'Z'
- || c >= 0x61 && c <= 0x7A; // 'a'--'z'
+ return (c >= 0x30 && c <= 0x39) // '0'--'9'
+ || (c >= 0x41 && c <= 0x5A) // 'A'--'Z'
+ || (c >= 0x61 && c <= 0x7A); // 'a'--'z'
}
}
diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx
index c4d23d602b36..c242127dbb5d 100644
--- a/pyuno/source/module/pyuno_module.cxx
+++ b/pyuno/source/module/pyuno_module.cxx
@@ -662,7 +662,7 @@ static PyObject *setCurrentContext( PyObject *, PyObject * args )
Reference< com::sun::star::uno::XCurrentContext > context;
- if( a.hasValue() && (a >>= context) || ! a.hasValue() )
+ if( (a.hasValue() && (a >>= context)) || ! a.hasValue() )
{
ret = com::sun::star::uno::setCurrentContext( context ) ? Py_True : Py_False;
}
diff --git a/sal/rtl/source/uri.cxx b/sal/rtl/source/uri.cxx
index 609ded2742bf..7af254581fdc 100644
--- a/sal/rtl/source/uri.cxx
+++ b/sal/rtl/source/uri.cxx
@@ -61,8 +61,11 @@ inline bool isDigit(sal_uInt32 nUtf32)
inline bool isAlpha(sal_uInt32 nUtf32)
{
- return nUtf32 >= 0x41 && nUtf32 <= 0x5A || nUtf32 >= 0x61 && nUtf32 <= 0x7A;
- // 'A'--'Z', 'a'--'z'
+ // 'A'--'Z', 'a'--'z'
+ return (
+ (nUtf32 >= 0x41 && nUtf32 <= 0x5A) ||
+ (nUtf32 >= 0x61 && nUtf32 <= 0x7A)
+ );
}
inline bool isHighSurrogate(sal_uInt32 nUtf16)
@@ -266,7 +269,7 @@ void writeUcs4(rtl_uString ** pBuffer, sal_Int32 * pCapacity, sal_uInt32 nUtf32)
static_cast< sal_Unicode >(nUtf32 >> 10 | 0xD800));
writeUnicode(
pBuffer, pCapacity,
- static_cast< sal_Unicode >(nUtf32 & 0x3FF | 0xDC00));
+ static_cast< sal_Unicode >((nUtf32 & 0x3FF) | 0xDC00));
}
}
@@ -294,20 +297,20 @@ bool writeEscapeChar(rtl_uString ** pBuffer, sal_Int32 * pCapacity,
else if (nUtf32 < 0x800)
{
writeEscapeOctet(pBuffer, pCapacity, nUtf32 >> 6 | 0xC0);
- writeEscapeOctet(pBuffer, pCapacity, nUtf32 & 0x3F | 0x80);
+ writeEscapeOctet(pBuffer, pCapacity, (nUtf32 & 0x3F) | 0x80);
}
else if (nUtf32 < 0x10000)
{
writeEscapeOctet(pBuffer, pCapacity, nUtf32 >> 12 | 0xE0);
- writeEscapeOctet(pBuffer, pCapacity, nUtf32 >> 6 & 0x3F | 0x80);
- writeEscapeOctet(pBuffer, pCapacity, nUtf32 & 0x3F | 0x80);
+ writeEscapeOctet(pBuffer, pCapacity, (nUtf32 >> 6 & 0x3F) | 0x80);
+ writeEscapeOctet(pBuffer, pCapacity, (nUtf32 & 0x3F) | 0x80);
}
else
{
writeEscapeOctet(pBuffer, pCapacity, nUtf32 >> 18 | 0xF0);
- writeEscapeOctet(pBuffer, pCapacity, nUtf32 >> 12 & 0x3F | 0x80);
- writeEscapeOctet(pBuffer, pCapacity, nUtf32 >> 6 & 0x3F | 0x80);
- writeEscapeOctet(pBuffer, pCapacity, nUtf32 & 0x3F | 0x80);
+ writeEscapeOctet(pBuffer, pCapacity, (nUtf32 >> 12 & 0x3F) | 0x80);
+ writeEscapeOctet(pBuffer, pCapacity, (nUtf32 >> 6 & 0x3F) | 0x80);
+ writeEscapeOctet(pBuffer, pCapacity, (nUtf32 & 0x3F) | 0x80);
}
} else {
rtl_UnicodeToTextConverter aConverter
@@ -452,8 +455,10 @@ rtl::OUString joinPaths(Component const & rBasePath, Component const & rRelPath)
for (sal_Unicode const * q = p; q != rBasePath.pEnd; ++q)
if (*q == '/')
{
- if (q - p == 1 && p[0] == '.'
- || q - p == 2 && p[0] == '.' && p[1] == '.')
+ if (
+ (q - p == 1 && p[0] == '.') ||
+ (q - p == 2 && p[0] == '.' && p[1] == '.')
+ )
{
nFixed = q + 1 - rBasePath.pBegin;
}
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 22c8dc780b89..73556dd5971c 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -1248,11 +1248,17 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
// remove the property if it does not have a value ( user left the dialog field empty)
// or if the port is set to 0
aPropertyValue= aPropertyValue.trim();
- if( aPropertyValue.getLength() == 0 ||
- (aPropertyName.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ftp.proxyPort"))) ||
+ if(
+ aPropertyValue.getLength() == 0 ||
+ (
+ (
+ aPropertyName.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ftp.proxyPort"))) ||
aPropertyName.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("http.proxyPort"))) /*||
- aPropertyName.equals( OUString( RTL_CONSTASCII_USTRINGPARAM("socksProxyPort")))*/) &&
- aPropertyValue.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0"))))
+ aPropertyName.equals( OUString( RTL_CONSTASCII_USTRINGPARAM("socksProxyPort")))*/
+ ) &&
+ aPropertyValue.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")))
+ )
+ )
{
// call java.lang.System.getProperties
jmethodID jmGetProps= pJNIEnv->GetStaticMethodID( jcSystem, "getProperties","()Ljava/util/Properties;");
diff --git a/stoc/source/uriproc/UriReferenceFactory.cxx b/stoc/source/uriproc/UriReferenceFactory.cxx
index f469864c97a4..96863ced36ca 100644
--- a/stoc/source/uriproc/UriReferenceFactory.cxx
+++ b/stoc/source/uriproc/UriReferenceFactory.cxx
@@ -85,7 +85,7 @@ bool isAlpha(sal_Unicode c) { //TODO: generally available?
}
bool isHexDigit(sal_Unicode c) { //TODO: generally available?
- return isDigit(c) || c >= 'A' && c <= 'F' || c >= 'a' && c <= 'f';
+ return isDigit(c) || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
}
sal_Unicode toLowerCase(sal_Unicode c) { //TODO: generally available?
@@ -230,7 +230,7 @@ css::uno::Reference< css::uri::XUriReference > parseGeneric(
bool isAbsolute = scheme.getLength() != 0;
bool isHierarchical
= !isAbsolute
- || schemeSpecificPart.getLength() > 0 && schemeSpecificPart[0] == '/';
+ || (schemeSpecificPart.getLength() > 0 && schemeSpecificPart[0] == '/');
bool hasAuthority = false;
rtl::OUString authority;
rtl::OUString path;
diff --git a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx
index 3c1749594d44..264f4d09d5f2 100644
--- a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx
+++ b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx
@@ -128,7 +128,7 @@ rtl::OUString parsePart(
encoded |= (n & 0x3F) << shift;
}
if (!utf8 || encoded < min
- || encoded >= 0xD800 && encoded <= 0xDFFF
+ || (encoded >= 0xD800 && encoded <= 0xDFFF)
|| encoded > 0x10FFFF)
{
break;