summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compilerplugins/clang/constparams.cxx5
-rw-r--r--cppuhelper/source/implbase_ex.cxx2
-rw-r--r--cppuhelper/source/servicemanager.cxx2
-rw-r--r--cppuhelper/source/servicemanager.hxx2
-rw-r--r--framework/source/fwe/classes/sfxhelperfunctions.cxx2
-rw-r--r--include/framework/sfxhelperfunctions.hxx2
-rw-r--r--l10ntools/source/localize.cxx2
-rw-r--r--lingucomponent/source/lingutil/lingutil.cxx4
-rw-r--r--pyuno/source/module/pyuno_dlopenwrapper.c2
-rw-r--r--salhelper/source/timer.cxx4
-rw-r--r--sfx2/source/doc/doctemplates.cxx1
-rw-r--r--solenv/bin/concat-deps.c4
-rw-r--r--soltools/cpp/_include.c2
-rw-r--r--soltools/cpp/_lex.c2
-rw-r--r--soltools/cpp/_macro.c2
-rw-r--r--soltools/cpp/_mcrvalid.c2
-rw-r--r--soltools/cpp/_tokens.c8
-rw-r--r--soltools/cpp/cpp.h16
-rw-r--r--soltools/mkdepend/cppsetup.c2
-rw-r--r--soltools/mkdepend/def.h16
-rw-r--r--soltools/mkdepend/include.c10
-rw-r--r--soltools/mkdepend/main.c8
-rw-r--r--soltools/mkdepend/parse.c6
-rw-r--r--soltools/mkdepend/pr.c2
24 files changed, 57 insertions, 51 deletions
diff --git a/compilerplugins/clang/constparams.cxx b/compilerplugins/clang/constparams.cxx
index d2d779c4d1c4..15936c9e593d 100644
--- a/compilerplugins/clang/constparams.cxx
+++ b/compilerplugins/clang/constparams.cxx
@@ -108,6 +108,11 @@ bool ConstParams::VisitFunctionDecl(FunctionDecl * functionDecl)
|| name == "file_write"
|| name == "SalMainPipeExchangeSignal_impl"
|| name.startswith("SbRtl_")
+ || name == "my_if_errors"
+ || name == "my_eval_defined"
+ || name == "my_eval_variable"
+ // #ifdef win32
+ || name == "convert_slashes"
// UNO component entry points
|| name.endswith("component_getFactory")
// in Scheduler::, wants to loop until a reference to a bool becomes true
diff --git a/cppuhelper/source/implbase_ex.cxx b/cppuhelper/source/implbase_ex.cxx
index 6025db018543..2b7b792e718a 100644
--- a/cppuhelper/source/implbase_ex.cxx
+++ b/cppuhelper/source/implbase_ex.cxx
@@ -163,7 +163,7 @@ bool recursivelyFindType(
}
static inline void * queryDeepNoXInterface(
- typelib_TypeDescriptionReference * pDemandedTDR, class_data * cd, void * that )
+ typelib_TypeDescriptionReference const * pDemandedTDR, class_data * cd, void * that )
{
type_entry * pEntries = getTypeEntries( cd );
sal_Int32 nTypes = cd->m_nTypes;
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index e3ddaee00798..5faee9a129b0 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -756,7 +756,7 @@ void cppuhelper::ServiceManager::addSingletonContextEntries(
void cppuhelper::ServiceManager::loadImplementation(
css::uno::Reference< css::uno::XComponentContext > const & context,
- std::shared_ptr< Data::Implementation > & implementation)
+ std::shared_ptr< Data::Implementation > const & implementation)
{
assert(implementation.get() != nullptr);
{
diff --git a/cppuhelper/source/servicemanager.hxx b/cppuhelper/source/servicemanager.hxx
index 1252b9dab37f..e36cff41e984 100644
--- a/cppuhelper/source/servicemanager.hxx
+++ b/cppuhelper/source/servicemanager.hxx
@@ -218,7 +218,7 @@ public:
void loadImplementation(
css::uno::Reference< css::uno::XComponentContext > const & context,
- std::shared_ptr< Data::Implementation > & implementation);
+ std::shared_ptr< Data::Implementation > const & implementation);
private:
virtual ~ServiceManager() override;
diff --git a/framework/source/fwe/classes/sfxhelperfunctions.cxx b/framework/source/fwe/classes/sfxhelperfunctions.cxx
index 4926874cee64..fd2684b4991a 100644
--- a/framework/source/fwe/classes/sfxhelperfunctions.cxx
+++ b/framework/source/fwe/classes/sfxhelperfunctions.cxx
@@ -88,7 +88,7 @@ pfunc_getRefreshToolbars SAL_CALL SetRefreshToolbars( pfunc_getRefreshToolbars p
return pOldFunc;
}
-void SAL_CALL RefreshToolbars( css::uno::Reference< css::frame::XFrame >& rFrame )
+void SAL_CALL RefreshToolbars( css::uno::Reference< css::frame::XFrame > const & rFrame )
{
pfunc_getRefreshToolbars pCallback = nullptr;
{
diff --git a/include/framework/sfxhelperfunctions.hxx b/include/framework/sfxhelperfunctions.hxx
index 5e96768b87b8..f5b5226b21fd 100644
--- a/include/framework/sfxhelperfunctions.hxx
+++ b/include/framework/sfxhelperfunctions.hxx
@@ -70,7 +70,7 @@ FWE_DLLPUBLIC svt::StatusbarController* SAL_CALL CreateStatusBarController(
FWE_DLLPUBLIC pfunc_getRefreshToolbars SAL_CALL SetRefreshToolbars( pfunc_getRefreshToolbars pRefreshToolbarsFunc );
FWE_DLLPUBLIC void SAL_CALL RefreshToolbars(
- css::uno::Reference< css::frame::XFrame >& rFrame );
+ css::uno::Reference< css::frame::XFrame > const & rFrame );
FWE_DLLPUBLIC pfunc_createDockingWindow SAL_CALL SetDockingWindowCreator( pfunc_createDockingWindow pCreateDockingWindow );
FWE_DLLPUBLIC void SAL_CALL CreateDockingWindow(
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 42c6184496fb..2e8e3c1f2012 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -428,7 +428,7 @@ void handleDirectory(
osl::Directory::remove(sPoUrl);
}
-void handleProjects(char * sSourceRoot, char const * sDestRoot)
+void handleProjects(char const * sSourceRoot, char const * sDestRoot)
{
OUString root16;
if (!rtl_convertStringToUString(
diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx
index 5ecb404ae9df..ee7981a46b1b 100644
--- a/lingucomponent/source/lingutil/lingutil.cxx
+++ b/lingucomponent/source/lingutil/lingutil.cxx
@@ -58,8 +58,8 @@ OString Win_AddLongPathPrefix( const OString &rPathName )
#ifdef SYSTEM_DICTS
// find old style dictionaries in system directories
void GetOldStyleDicsInDir(
- OUString& aSystemDir, OUString& aFormatName,
- OUString& aSystemSuffix, OUString& aSystemPrefix,
+ OUString const & aSystemDir, OUString const & aFormatName,
+ OUString const & aSystemSuffix, OUString const & aSystemPrefix,
std::set< OUString >& aDicLangInUse,
std::vector< SvtLinguConfigDictionaryEntry >& aRes )
{
diff --git a/pyuno/source/module/pyuno_dlopenwrapper.c b/pyuno/source/module/pyuno_dlopenwrapper.c
index 98593ebcf372..ac562809b11b 100644
--- a/pyuno/source/module/pyuno_dlopenwrapper.c
+++ b/pyuno/source/module/pyuno_dlopenwrapper.c
@@ -38,7 +38,7 @@
RTTI identity by comparing string addresses rather than string content).
*/
-static void * load(void * address, char const * symbol) {
+static void * load(void const * address, char const * symbol) {
Dl_info dl_info;
char * slash;
size_t len;
diff --git a/salhelper/source/timer.cxx b/salhelper/source/timer.cxx
index 435ea0a1f7e2..3b669d97a2b5 100644
--- a/salhelper/source/timer.cxx
+++ b/salhelper/source/timer.cxx
@@ -37,7 +37,7 @@ public:
void SAL_CALL registerTimer(salhelper::Timer* pTimer);
/// unregister timer
- void SAL_CALL unregisterTimer(salhelper::Timer* pTimer);
+ void SAL_CALL unregisterTimer(salhelper::Timer const * pTimer);
/// lookup timer
bool SAL_CALL lookupTimer(const salhelper::Timer* pTimer);
@@ -292,7 +292,7 @@ void TimerManager::registerTimer(Timer* pTimer)
}
}
-void TimerManager::unregisterTimer(Timer* pTimer)
+void TimerManager::unregisterTimer(Timer const * pTimer)
{
if (!pTimer)
return;
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 71402d8b86f4..76973ae9205f 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -503,6 +503,7 @@ void SfxDocTplService_Impl::readFolderList()
{
SolarMutexGuard aGuard;
+ static_assert( SAL_N_ELEMENTS(TEMPLATE_SHORT_NAMES_ARY) == SAL_N_ELEMENTS(TEMPLATE_LONG_NAMES_ARY), "mismatch array lengths" );
const size_t nCount = std::min(SAL_N_ELEMENTS(TEMPLATE_SHORT_NAMES_ARY), SAL_N_ELEMENTS(TEMPLATE_LONG_NAMES_ARY));
for (size_t i = 0; i < nCount; ++i)
{
diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c
index 602bdf4b7dbf..5b9fb4ea7dd1 100644
--- a/solenv/bin/concat-deps.c
+++ b/solenv/bin/concat-deps.c
@@ -353,7 +353,7 @@ struct hash
c ^= b; c -= rot(b,24); \
}
-static unsigned int hash_compute( struct hash* hash, const char* key, int length)
+static unsigned int hash_compute( struct hash const * hash, const char* key, int length)
{
unsigned int a;
unsigned int b;
@@ -509,7 +509,7 @@ unsigned int i;
}
}
-static inline int compare_key(struct hash* hash, const char* a, const char* b, int len, int* cost)
+static inline int compare_key(struct hash const * hash, const char* a, const char* b, int len, int const * cost)
{
#ifdef HASH_STAT
*cost += 1;
diff --git a/soltools/cpp/_include.c b/soltools/cpp/_include.c
index ba5866db1daf..1404aa4887a5 100644
--- a/soltools/cpp/_include.c
+++ b/soltools/cpp/_include.c
@@ -179,7 +179,7 @@ void
* Generate a pragma import/include directive
*/
void
- genimport(char *fname, int angled, char *iname, int import)
+ genimport(char const *fname, int angled, char const *iname, int import)
{
static Token ta = {UNCLASS, 0, 0, NULL, 0};
static Tokenrow tr = {&ta, &ta, &ta + 1, 1};
diff --git a/soltools/cpp/_lex.c b/soltools/cpp/_lex.c
index 94f218a536ef..6a5becb32679 100644
--- a/soltools/cpp/_lex.c
+++ b/soltools/cpp/_lex.c
@@ -645,7 +645,7 @@ int
* if fd==-1 and str, then from the string.
*/
Source *
- setsource(char *name, int path, int fd, char *str, int wrap)
+ setsource(char *name, int path, int fd, char const *str, int wrap)
{
Source *s = new(Source);
size_t len;
diff --git a/soltools/cpp/_macro.c b/soltools/cpp/_macro.c
index 0a64b060152c..a5e5b931d431 100644
--- a/soltools/cpp/_macro.c
+++ b/soltools/cpp/_macro.c
@@ -624,7 +624,7 @@ void
* corresponding index in the argname array. Return -1 if not found.
*/
int
- lookuparg(Nlist * mac, Token * tp)
+ lookuparg(Nlist * mac, Token const * tp)
{
Token *ap;
diff --git a/soltools/cpp/_mcrvalid.c b/soltools/cpp/_mcrvalid.c
index 7a64de71da64..637706530180 100644
--- a/soltools/cpp/_mcrvalid.c
+++ b/soltools/cpp/_mcrvalid.c
@@ -83,7 +83,7 @@ mvl_add( MacroValidatorList * inout_pValidators,
void
mvl_check( MacroValidatorList * inout_pValidators,
- Token * inout_pTokenToCheck)
+ Token const * inout_pTokenToCheck)
{
MacroValidator * pV; /* Running pointer */
MacroValidator * pCheckedOnes; /* Here new list is built. */
diff --git a/soltools/cpp/_tokens.c b/soltools/cpp/_tokens.c
index 097b627e88b6..4c73421b92da 100644
--- a/soltools/cpp/_tokens.c
+++ b/soltools/cpp/_tokens.c
@@ -251,7 +251,7 @@ int
* Canonical whitespace is assured on each side.
*/
void
- insertrow(Tokenrow * dtr, int ntok, Tokenrow * str)
+ insertrow(Tokenrow * dtr, int ntok, Tokenrow const * str)
{
int nrtok = (int)rowlen(str);
@@ -289,7 +289,7 @@ void
* Not strictly conforming.
*/
void
- movetokenrow(Tokenrow * dtr, Tokenrow * str)
+ movetokenrow(Tokenrow * dtr, Tokenrow const * str)
{
size_t nby;
@@ -325,7 +325,7 @@ void
* the space for the contents. Return the destination.
*/
Tokenrow *
- copytokenrow(Tokenrow * dtr, Tokenrow * str)
+ copytokenrow(Tokenrow * dtr, Tokenrow const * str)
{
int len = (int)rowlen(str);
@@ -543,7 +543,7 @@ char *
* Null terminated.
*/
uchar *
- newstring(uchar * s, size_t l, size_t o)
+ newstring(uchar const * s, size_t l, size_t o)
{
uchar *ns = (uchar *) domalloc(l + o + 1);
diff --git a/soltools/cpp/cpp.h b/soltools/cpp/cpp.h
index dc8dd8965e66..e09ea7db86f2 100644
--- a/soltools/cpp/cpp.h
+++ b/soltools/cpp/cpp.h
@@ -172,7 +172,7 @@ void mvl_add(
void mvl_check(
MacroValidatorList *
inout_pValidators,
- Token * inout_pTokenToCheck);
+ Token const * inout_pTokenToCheck);
void tokenrow_zeroTokenIdentifiers(Tokenrow* trp);
@@ -181,7 +181,7 @@ void fixlex(void);
void setup(int, char **);
int gettokens(Tokenrow *, int);
int comparetokens(Tokenrow *, Tokenrow *);
-Source *setsource(char *, int, int, char *, int);
+Source *setsource(char *, int, int, char const *, int);
void unsetsource(void);
void puttokens(Tokenrow *);
void process(Tokenrow *);
@@ -203,25 +203,25 @@ int gatherargs(Tokenrow *, Tokenrow **, int *);
void substargs(Nlist *, Tokenrow *, Tokenrow **);
void expandrow(Tokenrow *, char *);
void maketokenrow(int, Tokenrow *);
-Tokenrow *copytokenrow(Tokenrow *, Tokenrow *);
+Tokenrow *copytokenrow(Tokenrow *, Tokenrow const *);
Token *growtokenrow(Tokenrow *);
Tokenrow *normtokenrow(Tokenrow *);
void adjustrow(Tokenrow *, int);
-void movetokenrow(Tokenrow *, Tokenrow *);
-void insertrow(Tokenrow *, int, Tokenrow *);
+void movetokenrow(Tokenrow *, Tokenrow const *);
+void insertrow(Tokenrow *, int, Tokenrow const *);
void peektokens(Tokenrow *, char *);
void doconcat(Tokenrow *);
Tokenrow *stringify(Tokenrow *);
-int lookuparg(Nlist *, Token *);
+int lookuparg(Nlist *, Token const *);
long eval(Tokenrow *, int);
void genline(void);
-void genimport(char *, int, char *, int);
+void genimport(char const *, int, char const *, int);
void genwrap(int);
void setempty(Tokenrow *);
void makespace(Tokenrow *, Token *);
char *outnum(char *, int);
int digit(int);
-uchar *newstring(uchar *, size_t, size_t);
+uchar *newstring(uchar const *, size_t, size_t);
#define rowlen(tokrow) ((tokrow)->lp - (tokrow)->bp)
diff --git a/soltools/mkdepend/cppsetup.c b/soltools/mkdepend/cppsetup.c
index 12b7d12ef55d..e731e9fb47c1 100644
--- a/soltools/mkdepend/cppsetup.c
+++ b/soltools/mkdepend/cppsetup.c
@@ -194,7 +194,7 @@ my_eval_variable (IfParser *ip, const char *var, size_t len)
}
-int cppsetup(char *line)
+int cppsetup(char const *line)
{
IfParser ip;
int val = 0;
diff --git a/soltools/mkdepend/def.h b/soltools/mkdepend/def.h
index 4c3649cb8369..2ab9a4845770 100644
--- a/soltools/mkdepend/def.h
+++ b/soltools/mkdepend/def.h
@@ -151,18 +151,18 @@ char *malloc();
char *realloc();
#endif
-char *copy(char *);
+char *copy(char const *);
char *base_name(char *);
char *get_line(struct filepointer *);
char *isdefined(char *);
struct filepointer *getfile(char *);
-struct inclist *newinclude(char *newfile,
- char *incstring);
+struct inclist *newinclude(char const *newfile,
+ char const *incstring);
struct inclist *inc_path(char *, char *, boolean,
struct IncludesCollection *);
void define( char *def, struct symhash **symbols );
-void hash_define(char *name, char * val, struct symhash **symbols);
+void hash_define(char *name, char const * val, struct symhash **symbols);
struct symhash *hash_copy( struct symhash *symbols );
void hash_free( struct symhash *symbols );
void freefile( struct filepointer * fp );
@@ -171,19 +171,19 @@ int find_includes(struct filepointer *filep, struct inclist *file,
struct IncludesCollection* incCollection, struct symhash *symbols);
void included_by(struct inclist *ip,
struct inclist * newfile);
-int cppsetup(char *line);
+int cppsetup(char const *line);
void add_include(struct filepointer *filep, struct inclist *file,
struct inclist *file_red, char *include, boolean dot, boolean failOK,
struct IncludesCollection* incCollection, struct symhash *symbols);
-int match(char *str, char **list);
+int match(char const *str, char **list);
void recursive_pr_include(struct inclist *head, char *file,
char *base);
void recursive_pr_dummy(struct inclist *head, char *file);
void inc_clean(void);
void fatalerr(char *, ...);
-void warning(char *, ...);
-void warning1(char *, ...);
+void warning(char const *, ...);
+void warning1(char const *, ...);
void convert_slashes(char *);
char *append_slash(char *);
diff --git a/soltools/mkdepend/include.c b/soltools/mkdepend/include.c
index e83ac0fbc24b..4fbc651f15a9 100644
--- a/soltools/mkdepend/include.c
+++ b/soltools/mkdepend/include.c
@@ -32,8 +32,8 @@ in this Software without prior written authorization from the X Consortium.
#include <string.h>
void remove_dotdot( char * );
-int isdot( char * );
-int isdotdot( char * );
+int isdot( char const * );
+int isdotdot( char const * );
int issymbolic(char * dir, char * component);
int exists_path(struct IncludesCollection*, char*);
@@ -223,14 +223,14 @@ void remove_dotdot(char *path)
strcpy(path, newpath);
}
-int isdot(char *p)
+int isdot(char const *p)
{
if(p && p[0] == '.' && p[1] == '\0')
return TRUE;
return FALSE;
}
-int isdotdot(char *p)
+int isdotdot(char const *p)
{
if(p && p[0] == '.' && p[1] == '.' && p[2] == '\0')
return TRUE;
@@ -263,7 +263,7 @@ int issymbolic(char *dir, char *component)
/*
* Add an include file to the list of those included by 'file'.
*/
-struct inclist *newinclude(char *newfile, char *incstring)
+struct inclist *newinclude(char const *newfile, char const *incstring)
{
struct inclist *ip;
diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c
index 80aad85f5274..dcd86838f7da 100644
--- a/soltools/mkdepend/main.c
+++ b/soltools/mkdepend/main.c
@@ -525,7 +525,7 @@ void freefile(struct filepointer *fp)
free(fp);
}
-char *copy(char *str)
+char *copy(char const *str)
{
char *p = (char *)malloc(strlen(str) + 1);
@@ -533,7 +533,7 @@ char *copy(char *str)
return p;
}
-int match(char *str, char **list)
+int match(char const *str, char **list)
{
int i;
@@ -670,7 +670,7 @@ void fatalerr(char *msg, ...)
exit (1);
}
-void warning(char *msg, ...)
+void warning(char const *msg, ...)
{
#ifdef DEBUG_MKDEPEND
va_list args;
@@ -683,7 +683,7 @@ void warning(char *msg, ...)
#endif /* DEBUG_MKDEPEND */
}
-void warning1(char *msg, ...)
+void warning1(char const *msg, ...)
{
#ifdef DEBUG_MKDEPEND
va_list args;
diff --git a/soltools/mkdepend/parse.c b/soltools/mkdepend/parse.c
index 1da6448a253a..b538c87be22b 100644
--- a/soltools/mkdepend/parse.c
+++ b/soltools/mkdepend/parse.c
@@ -36,7 +36,7 @@ int gobble( struct filepointer *filep, struct inclist *file,
struct inclist *file_red, struct symhash *symbols );
int deftype ( char *line, struct inclist *file,
int parse_it, struct symhash *symbols);
-int zero_value(char *exp, struct symhash *symbols);
+int zero_value(char const *exp, struct symhash *symbols);
extern struct symhash *maininclist;
@@ -370,7 +370,7 @@ char * isdefined( char *symbol )
/*
* Return type based on if the #if expression evaluates to 0
*/
-int zero_value(char *exp, struct symhash *symbols)
+int zero_value(char const *exp, struct symhash *symbols)
{
global_symbols = symbols; /* HACK! see above */
if (cppsetup(exp))
@@ -466,7 +466,7 @@ void hash_free( struct symhash *symbols )
free( symbols->s_pairs );
}
-void hash_define( char *name, char *val, struct symhash **symbols )
+void hash_define( char *name, char const *val, struct symhash **symbols )
{
int hashval;
struct pair *it;
diff --git a/soltools/mkdepend/pr.c b/soltools/mkdepend/pr.c
index fe8d756a636c..9fd88877a8fd 100644
--- a/soltools/mkdepend/pr.c
+++ b/soltools/mkdepend/pr.c
@@ -73,7 +73,7 @@ void add_include(struct filepointer *filep, struct inclist *file, struct inclist
}
}
-void pr_dummy(struct inclist *ip)
+void pr_dummy(struct inclist const *ip)
{
fwrite(ip->i_file, strlen(ip->i_file), 1, stdout);
fwrite(" :\n\n", 4, 1, stdout);