Hi, patches replace sizeof/sizeof[0] with SAL_N_ELEMENTS in testing and sdk
-- Kenneth
diff --git a/odk/examples/OLE/activex/SOComWindowPeer.cpp b/odk/examples/OLE/activex/SOComWindowPeer.cpp index 0b2fabf..a3f4d50 100644 --- a/odk/examples/OLE/activex/SOComWindowPeer.cpp +++ b/odk/examples/OLE/activex/SOComWindowPeer.cpp @@ -38,6 +38,7 @@ #include "stdafx2.h" #include "so_activex.h" #include "SOComWindowPeer.h" +#include <sal/macros.h> ///////////////////////////////////////////////////////////////////////////// // @@ -49,7 +50,7 @@ STDMETHODIMP SOComWindowPeer::InterfaceSupportsErrorInfo(REFIID riid) &IID_ISOComWindowPeer, }; - for (int i=0;i<sizeof(arr)/sizeof(arr[0]);i++) + for (int i=0; i<SAL_N_ELEMENTS(arr) ;i++) { if (InlineIsEqualGUID(*arr[i],riid)) return S_OK;
diff --git a/test/source/cpp/officeconnection.cxx b/test/source/cpp/officeconnection.cxx index d8198a0..fd71df6 100644 --- a/test/source/cpp/officeconnection.cxx +++ b/test/source/cpp/officeconnection.cxx @@ -40,6 +40,7 @@ #include "osl/process.h" #include "osl/time.h" #include "sal/types.h" +#include <sal/macros.h> #include "test/getargument.hxx" #include "test/officeconnection.hxx" #include "test/toabsolutefileurl.hxx" @@ -109,7 +110,7 @@ void OfficeConnection::setUp() { osl_executeProcess( toAbsoluteFileUrl( argSoffice.copy(RTL_CONSTASCII_LENGTH("path:"))).pData, - args, sizeof args / sizeof args[0], 0, 0, 0, envs, + args, SAL_N_ELEMENTS( args ), 0, 0, 0, envs, envs == 0 ? 0 : 1, &process_)); } else if (argSoffice.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("connect:"))) { desc = argSoffice.copy(RTL_CONSTASCII_LENGTH("connect:"));
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice