summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-05 10:15:38 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-05 14:58:00 +0000
commit12bcfec04fcbe6425e327109ad47cd2b2b80d2bd (patch)
treeb57ac6784ce892defa6d06fd5974318c8ffb6972 /cppu
parentea272d9fe4bf2dc7419f76e2ddee707d768ccd50 (diff)
markup with event type not checker type
Change-Id: I14c0c5d90b67000cb4fe9e6be647854abfe784da
Diffstat (limited to 'cppu')
-rw-r--r--cppu/source/typelib/static_types.cxx2
-rw-r--r--cppu/source/typelib/typelib.cxx4
-rw-r--r--cppu/source/uno/sequence.cxx14
3 files changed, 12 insertions, 8 deletions
diff --git a/cppu/source/typelib/static_types.cxx b/cppu/source/typelib/static_types.cxx
index 887a884bf0ce..13d2e859bf4c 100644
--- a/cppu/source/typelib/static_types.cxx
+++ b/cppu/source/typelib/static_types.cxx
@@ -445,7 +445,7 @@ CPPU_DLLPUBLIC void SAL_CALL typelib_static_interface_type_init(
typelib_TypeDescriptionReference * pBaseType )
SAL_THROW_EXTERN_C()
{
- // coverity[array_vs_singleton]
+ // coverity[callee_ptr_arith]
typelib_static_mi_interface_type_init(
ppRef, pTypeName, pBaseType == 0 ? 0 : 1, &pBaseType);
}
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index b0b1a17d306e..7f3e808ebda4 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -901,14 +901,12 @@ extern "C" CPPU_DLLPUBLIC void SAL_CALL typelib_typedescription_newInterface(
typelib_TypeDescriptionReference ** ppMembers )
SAL_THROW_EXTERN_C()
{
- // coverity[array_vs_singleton]
+ // coverity[callee_ptr_arith]
typelib_typedescription_newMIInterface(
ppRet, pTypeName, 0, 0, 0, 0, 0, pBaseInterface == 0 ? 0 : 1,
&pBaseInterface, nMembers, ppMembers);
}
-
-
namespace {
class BaseList {
diff --git a/cppu/source/uno/sequence.cxx b/cppu/source/uno/sequence.cxx
index 1f06dd39c4c6..2d2a894b36e9 100644
--- a/cppu/source/uno/sequence.cxx
+++ b/cppu/source/uno/sequence.cxx
@@ -268,7 +268,10 @@ static inline bool idefaultConstructElements(
case typelib_TypeClass_SEQUENCE:
{
if (nAlloc >= 0)
- pSeq = reallocSeq( pSeq, sizeof(uno_Sequence *), nAlloc );
+ {
+ // coverity[suspicious_sizeof] - sizeof(uno_Sequence*) is correct here
+ pSeq = reallocSeq(pSeq, sizeof(uno_Sequence*), nAlloc);
+ }
if (pSeq != 0)
{
uno_Sequence ** pElements =
@@ -431,8 +434,8 @@ static inline bool icopyConstructFromElements(
rtl_uString ** pDestElements = (rtl_uString **) pSeq->elements;
for ( sal_Int32 nPos = nStartIndex; nPos < nStopIndex; ++nPos )
{
- // https://communities.coverity.com/thread/2993
- /* coverity[overrun-buffer-arg] */
+ // This code tends to trigger coverity's overrun-buffer-arg warning
+ // coverity[index_parm_via_loop_bound] - https://communities.coverity.com/thread/2993
::rtl_uString_acquire(
((rtl_uString **)pSourceElements)[nPos] );
pDestElements[nPos] = ((rtl_uString **)pSourceElements)[nPos];
@@ -534,7 +537,10 @@ static inline bool icopyConstructFromElements(
case typelib_TypeClass_SEQUENCE: // sequence of sequence
{
if (nAlloc >= 0)
- pSeq = reallocSeq( pSeq, sizeof(uno_Sequence *), nAlloc );
+ {
+ // coverity[suspicious_sizeof] - sizeof(uno_Sequence*) is correct here
+ pSeq = reallocSeq(pSeq, sizeof(uno_Sequence*), nAlloc);
+ }
if (pSeq != 0)
{
typelib_TypeDescription * pElementTypeDescr = 0;