[Libreoffice-commits] core.git: 5 commits - compilerplugins/clang cppuhelper/source forms/source include/rtl include/sal odk/source rsc/source sal/osl sd/source shell/source solenv/gbuild soltools/mkdepend svx/inc svx/source
Stephan Bergmann
sbergman at redhat.com
Tue Jun 17 06:52:33 PDT 2014
compilerplugins/clang/implicitboolconversion.cxx | 17 +-
cppuhelper/source/findsofficepath.c | 2
forms/source/component/ImageControl.hxx | 1
forms/source/richtext/richtextcontrol.cxx | 2
forms/source/richtext/richtextcontrol.hxx | 4
include/rtl/locale.h | 2
include/rtl/process.h | 2
include/sal/main.h | 2
odk/source/unoapploader/unx/unoapploader.c | 4
rsc/source/rscpp/cpp.h | 46 +++----
rsc/source/rscpp/cpp3.c | 2
rsc/source/rscpp/cpp4.c | 4
rsc/source/rscpp/cpp5.c | 4
rsc/source/rscpp/cpp6.c | 2
sal/osl/unx/pipe.c | 2
sal/osl/unx/saltime.h | 2
sal/osl/unx/signal.c | 6 -
sal/osl/unx/socket.c | 2
sal/osl/unx/time.c | 2
sd/source/ui/inc/ViewShell.hxx | 1
sd/source/ui/slideshow/slideshowimpl.cxx | 11 -
sd/source/ui/slideshow/slideshowimpl.hxx | 2
sd/source/ui/slideshow/slideshowviewimpl.cxx | 1
sd/source/ui/slideshow/slideshowviewimpl.hxx | 1
sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx | 3
shell/source/unix/misc/uri-encode.c | 2
solenv/gbuild/platform/com_GCC_defs.mk | 1
soltools/mkdepend/cppsetup.c | 19 ---
soltools/mkdepend/def.h | 2
soltools/mkdepend/ifparser.c | 60 ++--------
soltools/mkdepend/ifparser.h | 8 -
soltools/mkdepend/include.c | 2
soltools/mkdepend/main.c | 4
soltools/mkdepend/parse.c | 3
soltools/mkdepend/pr.c | 3
svx/inc/pch/precompiled_svxcore.hxx | 1
svx/source/form/fmscriptingenv.cxx | 7 -
svx/source/inc/fmtextcontrolshell.hxx | 11 -
38 files changed, 96 insertions(+), 154 deletions(-)
New commits:
commit a15715c34309416e76ebd2007a51ff6c42f28817
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jun 17 15:36:26 2014 +0200
-Wstrict-prototypes
...no reason to not have it enabled for URE C include files and what
little real C code is still left. (But note that Clang ignores that
warning.)
Change-Id: Ia6940f9f940a0c226e9b724331d65c9862ce32e6
diff --git a/cppuhelper/source/findsofficepath.c b/cppuhelper/source/findsofficepath.c
index 14ecacb..f062d8f 100644
--- a/cppuhelper/source/findsofficepath.c
+++ b/cppuhelper/source/findsofficepath.c
@@ -113,7 +113,7 @@ static char* platformSpecific()
* @return the installation path or NULL, if no installation was found or
* if an error occurred
*/
-static char* platformSpecific()
+static char* platformSpecific(void)
{
const int SEPARATOR = '/';
const char* PATHSEPARATOR = ":";
diff --git a/include/rtl/locale.h b/include/rtl/locale.h
index e302be4..e410e02 100644
--- a/include/rtl/locale.h
+++ b/include/rtl/locale.h
@@ -83,7 +83,7 @@ SAL_DLLPUBLIC rtl_Locale * SAL_CALL rtl_locale_register(
for different fields, e.g. in a spreadsheet.
<BR>Note that the initial setting will match the host system.
*/
-SAL_DLLPUBLIC rtl_Locale * SAL_CALL rtl_locale_getDefault();
+SAL_DLLPUBLIC rtl_Locale * SAL_CALL rtl_locale_getDefault(void);
/**
Sets the default.
diff --git a/include/rtl/process.h b/include/rtl/process.h
index 2213bea..bd55a3a 100644
--- a/include/rtl/process.h
+++ b/include/rtl/process.h
@@ -68,7 +68,7 @@ SAL_DLLPUBLIC oslProcessError SAL_CALL rtl_getAppCommandArg(sal_uInt32 nArg, rtl
@see osl_getCommandArgCount()
@see rtl_getCommandArg()
*/
-SAL_DLLPUBLIC sal_uInt32 SAL_CALL rtl_getAppCommandArgCount();
+SAL_DLLPUBLIC sal_uInt32 SAL_CALL rtl_getAppCommandArgCount(void);
#ifdef __cplusplus
}
diff --git a/include/sal/main.h b/include/sal/main.h
index 5d21b25..7c79fad 100644
--- a/include/sal/main.h
+++ b/include/sal/main.h
@@ -34,7 +34,7 @@ extern "C" {
#endif
SAL_DLLPUBLIC void SAL_CALL sal_detail_initialize(int argc, char ** argv);
-SAL_DLLPUBLIC void SAL_CALL sal_detail_deinitialize();
+SAL_DLLPUBLIC void SAL_CALL sal_detail_deinitialize(void);
#if defined IOS || defined ANDROID
diff --git a/odk/source/unoapploader/unx/unoapploader.c b/odk/source/unoapploader/unx/unoapploader.c
index 5dc3abe..48e3678 100644
--- a/odk/source/unoapploader/unx/unoapploader.c
+++ b/odk/source/unoapploader/unx/unoapploader.c
@@ -32,7 +32,7 @@
#include "rtl/string.h"
#include "sal/types.h"
-char const* getPath();
+char const* getPath(void);
char* createCommandName( char* argv0 );
const int SEPARATOR = '/';
@@ -234,7 +234,7 @@ int main( int argc, char *argv[] )
* @return the installation path or NULL, if no installation was specified or
* found, or if an error occurred
*/
-char const* getPath()
+char const* getPath(void)
{
char const* path = cppuhelper_detail_findSofficePath();
diff --git a/rsc/source/rscpp/cpp.h b/rsc/source/rscpp/cpp.h
index 260e5d5..2a42f89 100644
--- a/rsc/source/rscpp/cpp.h
+++ b/rsc/source/rscpp/cpp.h
@@ -295,12 +295,12 @@ int rscpp_main( int argc, char **argv );
#endif
-void InitCpp1();
-void InitCpp2();
-void InitCpp3();
-void InitCpp4();
-void InitCpp5();
-void InitCpp6();
+void InitCpp1(void);
+void InitCpp2(void);
+void InitCpp3(void);
+void InitCpp4(void);
+void InitCpp5(void);
+void InitCpp6(void);
#define HELLO() fprintf( stderr, "[Hello at %s, %d] ", __FILE__, __LINE__ )
@@ -310,8 +310,8 @@ void InitCpp6();
/* cpp1.c */
void output( int c );
-void sharp();
-void cppmain();
+void sharp(void);
+void cppmain(void);
#if OSL_DEBUG_LEVEL > 1
#ifdef EVALDEFS
int outputEval( int c );
@@ -321,8 +321,8 @@ int outputEval( int c );
/* cpp2.c */
int control( int counter );
-void doinclude();
-void dodefine();
+void doinclude(void);
+void dodefine(void);
void doif( int hash );
int openinclude( char *, int );
int hasdirectory(char *, char * );
@@ -331,19 +331,19 @@ int openfile( char * );
/* cpp3.c */
int openfiles( char *filename );
void addfile( FILE *fp, char *filename );
-void setincdirs();
+void setincdirs(void);
int AddInclude( char *pIncStr );
int getredirection( int argc, char **argv );
void zap_uc( char *ap );
-void initdefines();
+void initdefines(void);
int dooptions( int argc, char *argv[] );
int readoptions(char* filename, char*** pfargv);
/* cpp4.c */
-void dodefines();
+void dodefines(void);
void checkparm( int c, DEFBUF *dp );
-int expcollect();
+int expcollect(void);
void expstuff( DEFBUF *dp );
#if STRING_FORMAL
@@ -355,27 +355,27 @@ void stparmscan( int delim);
void dumpparm( char *why );
#endif
-void doundef();
+void doundef(void);
void textput( char *text );
void charput( int c );
void expand( DEFBUF *tokenp );
/* cpp5.c */
-int eval();
+int eval(void);
int evallex(int);
int *evaleval(int *, int, int );
int evalchar(int);
-int dosizeof();
+int dosizeof(void);
int evalnum( int c );
int bittest( int );
/* cpp6.c */
-void skipnl();
-int skipws();
+void skipnl(void);
+int skipws(void);
void scanid( int c );
int macroid( int c );
-int catenate();
+int catenate(void);
int scanstring( int c, void (*outfun)( int c ) );
void scannumber( int c, void (*outfun)( int c ) );
void save( int c );
@@ -386,9 +386,9 @@ DEFBUF *lookid( int c );
DEFBUF *defendel( char *name, int delete );
void dunpdef( char *why );
void dumpadef( char *why, DEFBUF *dp);
-int get();
-int cget();
-void unget();
+int get(void);
+int cget(void);
+void unget(void);
void ungetstring( char *text );
void cerror( char *format, char *sarg);
void cwarn( char *format, char *sarg);
diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c
index 40635ed..81a5ac8 100644
--- a/rsc/source/rscpp/cpp3.c
+++ b/rsc/source/rscpp/cpp3.c
@@ -441,7 +441,7 @@ void initdefines()
time_t tvec;
#if !defined( WNT ) && !defined(G3)
- extern char *ctime();
+ extern char *ctime(time_t const *);
#endif
/*
diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c
index f82faac..d5af024 100644
--- a/rsc/source/rscpp/cpp4.c
+++ b/rsc/source/rscpp/cpp4.c
@@ -397,7 +397,7 @@ void expand(DEFBUF* tokenp)
{
register int c;
register FILEINFO *file;
- extern FILEINFO *getfile();
+ extern FILEINFO *getfile(int, char *);
#if OSL_DEBUG_LEVEL > 1
if (debug)
@@ -553,7 +553,7 @@ void expstuff(DEFBUF* tokenp)
char *defend; /* -> output buff end */
int string_magic; /* String formal hack */
FILEINFO *file; /* Funny #include */
- extern FILEINFO *getfile();
+ extern FILEINFO *getfile(int, char *);
file = getfile(NBUFF, tokenp->name);
inp = tokenp->repl; /* -> macro replacement */
diff --git a/rsc/source/rscpp/cpp5.c b/rsc/source/rscpp/cpp5.c
index 09a1c5c..14adf4f 100644
--- a/rsc/source/rscpp/cpp5.c
+++ b/rsc/source/rscpp/cpp5.c
@@ -139,7 +139,7 @@ register int op;
#define S_PDOUBLE (sizeof (double *))
#endif
#ifndef S_PFPTR
-#define S_PFPTR (sizeof (int (*)()))
+#define S_PFPTR (sizeof (int (*)(void)))
#endif
typedef struct types {
@@ -218,7 +218,7 @@ eval()
int skip; /* For short-circuit testing */
int value[NEXP]; /* Value stack */
OPTAB opstack[NEXP]; /* Operand stack */
- extern int *evaleval(); /* Does actual evaluation */
+ extern int *evaleval(int *, int, int); /* Does actual evaluation */
valp = value;
opp = opstack;
opp->op = OP_END; /* Mark bottom of stack */
diff --git a/rsc/source/rscpp/cpp6.c b/rsc/source/rscpp/cpp6.c
index 59708ef..49d12dd 100644
--- a/rsc/source/rscpp/cpp6.c
+++ b/rsc/source/rscpp/cpp6.c
@@ -1021,7 +1021,7 @@ void ungetstring(char* text)
*/
{
register FILEINFO *file;
- extern FILEINFO *getfile();
+ extern FILEINFO *getfile(int, char *);
file = getfile(strlen(text) + 1, "");
strcpy(file->buffer, text);
}
diff --git a/sal/osl/unx/pipe.c b/sal/osl/unx/pipe.c
index 10ac932..b0ee432 100644
--- a/sal/osl/unx/pipe.c
+++ b/sal/osl/unx/pipe.c
@@ -89,7 +89,7 @@ static oslPipeError osl_PipeErrorFromNative(int nativeType)
/* macros */
#define ERROR_FROM_NATIVE(y) osl_PipeErrorFromNative(y)
-oslPipe __osl_createPipeImpl()
+oslPipe __osl_createPipeImpl(void)
{
oslPipe pPipeImpl;
diff --git a/sal/osl/unx/saltime.h b/sal/osl/unx/saltime.h
index 001944f..735be78 100644
--- a/sal/osl/unx/saltime.h
+++ b/sal/osl/unx/saltime.h
@@ -26,7 +26,7 @@
extern "C" {
#endif
-void sal_initGlobalTimer();
+void sal_initGlobalTimer(void);
#if defined __cplusplus
}
diff --git a/sal/osl/unx/signal.c b/sal/osl/unx/signal.c
index 93da6c6..d8d2190 100644
--- a/sal/osl/unx/signal.c
+++ b/sal/osl/unx/signal.c
@@ -199,7 +199,7 @@ static sal_Bool is_soffice_Impl (void)
return (idx != -1);
}
-static sal_Bool InitSignal()
+static sal_Bool InitSignal(void)
{
int i;
struct sigaction act;
@@ -288,7 +288,7 @@ static sal_Bool InitSignal()
return sal_True;
}
-static sal_Bool DeInitSignal()
+static sal_Bool DeInitSignal(void)
{
int i;
struct sigaction act;
@@ -889,7 +889,7 @@ void CallSystemHandler(int Signal)
}
#if defined HAVE_VALGRIND_HEADERS
-static void DUMPCURRENTALLOCS()
+static void DUMPCURRENTALLOCS(void)
{
VALGRIND_PRINTF( "=== start memcheck dump of active allocations ===\n" );
diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c
index d11297f..fb6ced2 100644
--- a/sal/osl/unx/socket.c
+++ b/sal/osl/unx/socket.c
@@ -466,7 +466,7 @@ void __osl_destroySocketImpl(oslSocket Socket)
#endif
}
-static oslSocketAddr __osl_createSocketAddr( )
+static oslSocketAddr __osl_createSocketAddr(void)
{
oslSocketAddr pAddr = (oslSocketAddr) rtl_allocateZeroMemory( sizeof( struct oslSocketAddrImpl ));
#if OSL_DEBUG_LEVEL > 1
diff --git a/sal/osl/unx/time.c b/sal/osl/unx/time.c
index e80fd41..c474af6 100644
--- a/sal/osl/unx/time.c
+++ b/sal/osl/unx/time.c
@@ -260,7 +260,7 @@ sal_Bool SAL_CALL osl_getSystemTimeFromLocalTime( const TimeValue* pLocalTimeVal
return sal_False;
}
-void sal_initGlobalTimer()
+void sal_initGlobalTimer(void)
{
#ifdef __MACH__
clock_serv_t cclock;
diff --git a/shell/source/unix/misc/uri-encode.c b/shell/source/unix/misc/uri-encode.c
index aba7f62..f7bca6f 100644
--- a/shell/source/unix/misc/uri-encode.c
+++ b/shell/source/unix/misc/uri-encode.c
@@ -23,7 +23,7 @@
#include <stdlib.h>
#include <string.h>
-int main() {
+int main(void) {
for (;;) {
int c;
errno = 0;
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 8e96888..acfe2b4 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -53,6 +53,7 @@ gb_CFLAGS_COMMON := \
-Wall \
-Wendif-labels \
-Wextra \
+ -Wstrict-prototypes \
-Wundef \
-Wunused-macros \
-fmessage-length=0 \
diff --git a/soltools/mkdepend/cppsetup.c b/soltools/mkdepend/cppsetup.c
index f4cdaa5..7d96774 100644
--- a/soltools/mkdepend/cppsetup.c
+++ b/soltools/mkdepend/cppsetup.c
@@ -119,10 +119,7 @@ struct _parse_data {
};
static const char *
-_my_if_errors (ip, cp, expecting)
- IfParser *ip;
- const char *cp;
- const char *expecting;
+_my_if_errors (IfParser *ip, const char *cp, const char *expecting)
{
#ifdef DEBUG_MKDEPEND
struct _parse_data *pd = (struct _parse_data *) ip->data;
@@ -154,9 +151,7 @@ _my_if_errors (ip, cp, expecting)
#define MAXNAMELEN 256
char *
-_lookup_variable (var, len)
- const char *var;
- int len;
+_lookup_variable (const char *var, int len)
{
char tmpbuf[MAXNAMELEN + 1];
@@ -170,10 +165,7 @@ _lookup_variable (var, len)
static int
-_my_eval_defined (ip, var, len)
- IfParser *ip;
- const char *var;
- int len;
+_my_eval_defined (IfParser *ip, const char *var, int len)
{
(void)ip;
if (_lookup_variable (var, len))
@@ -185,10 +177,7 @@ _my_eval_defined (ip, var, len)
#define isvarfirstletter(ccc) (isalpha(ccc) || (ccc) == '_')
static int
-_my_eval_variable (ip, var, len)
- IfParser *ip;
- const char *var;
- int len;
+_my_eval_variable (IfParser *ip, const char *var, int len)
{
char *s;
diff --git a/soltools/mkdepend/def.h b/soltools/mkdepend/def.h
index dcb3c1f..94bc255 100644
--- a/soltools/mkdepend/def.h
+++ b/soltools/mkdepend/def.h
@@ -184,7 +184,7 @@ int match(register char *str, register char **list);
void recursive_pr_include(register struct inclist *head, register char *file,
register char *base);
void recursive_pr_dummy(register struct inclist *head, register char *file);
-void inc_clean();
+void inc_clean(void);
void fatalerr(char *, ...);
void warning(char *, ...);
diff --git a/soltools/mkdepend/ifparser.c b/soltools/mkdepend/ifparser.c
index 6518b1e..f9b4b66 100644
--- a/soltools/mkdepend/ifparser.c
+++ b/soltools/mkdepend/ifparser.c
@@ -74,10 +74,7 @@
static const char *
-parse_variable (g, cp, varp)
- IfParser *g;
- const char *cp;
- const char **varp;
+parse_variable (IfParser *g, const char *cp, const char **varp)
{
SKIPSPACE (cp);
@@ -92,10 +89,7 @@ parse_variable (g, cp, varp)
static const char *
-parse_number (g, cp, valp)
- IfParser *g;
- const char *cp;
- int *valp;
+parse_number (IfParser *g, const char *cp, int *valp)
{
SKIPSPACE (cp);
@@ -117,10 +111,7 @@ parse_number (g, cp, valp)
static const char *
-parse_value (g, cp, valp)
- IfParser *g;
- const char *cp;
- int *valp;
+parse_value (IfParser *g, const char *cp, int *valp)
{
const char *var;
@@ -200,10 +191,7 @@ parse_value (g, cp, valp)
static const char *
-parse_product (g, cp, valp)
- IfParser *g;
- const char *cp;
- int *valp;
+parse_product (IfParser *g, const char *cp, int *valp)
{
int rightval;
@@ -235,10 +223,7 @@ parse_product (g, cp, valp)
static const char *
-parse_sum (g, cp, valp)
- IfParser *g;
- const char *cp;
- int *valp;
+parse_sum (IfParser *g, const char *cp, int *valp)
{
int rightval;
@@ -261,10 +246,7 @@ parse_sum (g, cp, valp)
static const char *
-parse_shift (g, cp, valp)
- IfParser *g;
- const char *cp;
- int *valp;
+parse_shift (IfParser *g, const char *cp, int *valp)
{
int rightval;
@@ -291,10 +273,7 @@ parse_shift (g, cp, valp)
static const char *
-parse_inequality (g, cp, valp)
- IfParser *g;
- const char *cp;
- int *valp;
+parse_inequality (IfParser *g, const char *cp, int *valp)
{
int rightval;
@@ -327,10 +306,7 @@ parse_inequality (g, cp, valp)
static const char *
-parse_equality (g, cp, valp)
- IfParser *g;
- const char *cp;
- int *valp;
+parse_equality (IfParser *g, const char *cp, int *valp)
{
int rightval;
@@ -357,10 +333,7 @@ parse_equality (g, cp, valp)
static const char *
-parse_band (g, cp, valp)
- IfParser *g;
- const char *cp;
- int *valp;
+parse_band (IfParser *g, const char *cp, int *valp)
{
int rightval;
@@ -380,10 +353,7 @@ parse_band (g, cp, valp)
static const char *
-parse_bor (g, cp, valp)
- IfParser *g;
- const char *cp;
- int *valp;
+parse_bor (IfParser *g, const char *cp, int *valp)
{
int rightval;
@@ -403,10 +373,7 @@ parse_bor (g, cp, valp)
static const char *
-parse_land (g, cp, valp)
- IfParser *g;
- const char *cp;
- int *valp;
+parse_land (IfParser *g, const char *cp, int *valp)
{
int rightval;
@@ -426,10 +393,7 @@ parse_land (g, cp, valp)
static const char *
-parse_lor (g, cp, valp)
- IfParser *g;
- const char *cp;
- int *valp;
+parse_lor (IfParser *g, const char *cp, int *valp)
{
int rightval;
diff --git a/soltools/mkdepend/ifparser.h b/soltools/mkdepend/ifparser.h
index a5dfbd3..c404e43 100644
--- a/soltools/mkdepend/ifparser.h
+++ b/soltools/mkdepend/ifparser.h
@@ -64,10 +64,10 @@ typedef int Bool;
typedef struct _if_parser {
struct { /* functions */
- const char *(*handle_error) (/* struct _if_parser *, const char *,
- const char * */);
- int (*eval_variable) (/* struct _if_parser *, const char *, int */);
- int (*eval_defined) (/* struct _if_parser *, const char *, int */);
+ const char *(*handle_error) (struct _if_parser *, const char *,
+ const char *);
+ int (*eval_variable) (struct _if_parser *, const char *, int);
+ int (*eval_defined) (struct _if_parser *, const char *, int);
} funcs;
char *data;
} IfParser;
diff --git a/soltools/mkdepend/include.c b/soltools/mkdepend/include.c
index dbdd1cf..b3448d9 100644
--- a/soltools/mkdepend/include.c
+++ b/soltools/mkdepend/include.c
@@ -317,7 +317,7 @@ void included_by(ip, newfile)
ip->i_list[ ip->i_listlen-1 ] = newfile;
}
-void inc_clean ()
+void inc_clean (void)
{
register struct inclist *ip;
diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c
index b636498..9b67e37 100644
--- a/soltools/mkdepend/main.c
+++ b/soltools/mkdepend/main.c
@@ -163,9 +163,7 @@ struct sigaction sig_act;
boolean native_win_slashes = FALSE;
-int main(argc, argv)
- int argc;
- char **argv;
+int main(int argc, char **argv)
{
register char **fp = filelist;
register char **incp = includedirs;
diff --git a/soltools/mkdepend/parse.c b/soltools/mkdepend/parse.c
index 7d95f0a..bcc5b7e 100644
--- a/soltools/mkdepend/parse.c
+++ b/soltools/mkdepend/parse.c
@@ -410,8 +410,7 @@ void define( def, symbols )
hash_define( def, val, symbols );
}
-static int hash( str )
- register char *str;
+static int hash( register char *str )
{
/* Hash (Kernighan and Ritchie) */
register unsigned int hashval = 0;
diff --git a/soltools/mkdepend/pr.c b/soltools/mkdepend/pr.c
index 6ebb01a..d02414d 100644
--- a/soltools/mkdepend/pr.c
+++ b/soltools/mkdepend/pr.c
@@ -79,8 +79,7 @@ void add_include(struct filepointer *filep, struct inclist *file, struct inclist
}
}
-void pr_dummy(ip)
- register struct inclist *ip;
+void pr_dummy(register struct inclist *ip)
{
fwrite(ip->i_file, strlen(ip->i_file), 1, stdout);
fwrite(" :\n\n", 4, 1, stdout);
commit 6fcc7efad066d6f3804196f3d3fbddd6a0a485cb
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jun 17 10:41:49 2014 +0200
Fix logic to obtain callee's FunctionProtoType (if any)
Change-Id: I1bfdd865429cc6fa89ea3b6b4fc132b5d5b57b0d
diff --git a/compilerplugins/clang/implicitboolconversion.cxx b/compilerplugins/clang/implicitboolconversion.cxx
index 6503ca8..d8ef00e 100644
--- a/compilerplugins/clang/implicitboolconversion.cxx
+++ b/compilerplugins/clang/implicitboolconversion.cxx
@@ -170,17 +170,22 @@ bool ImplicitBoolConversion::TraverseCallExpr(CallExpr * expr) {
FunctionDecl const * fd = dyn_cast<FunctionDecl>(d);
if (fd != nullptr && fd->isExternC()) {
ext = true;
- PointerType const * pt = dyn_cast<PointerType>(fd->getType());
- t = (pt == nullptr ? fd->getType() : pt->getPointeeType())
- ->getAs<FunctionProtoType>();
+ PointerType const * pt = fd->getType()->getAs<PointerType>();
+ QualType t2(pt == nullptr ? fd->getType() : pt->getPointeeType());
+ t = t2->getAs<FunctionProtoType>();
+ assert(
+ t != nullptr || !compiler.getLangOpts().CPlusPlus
+ || (fd->getBuiltinID() != Builtin::NotBuiltin
+ && isa<FunctionNoProtoType>(t2)));
+ // __builtin_*s have no proto type?
} else {
VarDecl const * vd = dyn_cast<VarDecl>(d);
if (vd != nullptr && vd->isExternC())
{
ext = true;
- PointerType const * pt = dyn_cast<PointerType>(vd->getType());
+ PointerType const * pt = vd->getType()->getAs<PointerType>();
t = (pt == nullptr ? vd->getType() : pt->getPointeeType())
- ->getAs<FunctionProtoType>();
+ ->castAs<FunctionProtoType>();
}
}
}
@@ -192,7 +197,7 @@ bool ImplicitBoolConversion::TraverseCallExpr(CallExpr * expr) {
[&i](Expr * e) { return i == e->IgnoreParens(); });
if (j == expr->arg_end()) {
reportWarning(i);
- } else {
+ } else if (t != nullptr) {
std::ptrdiff_t n = j - expr->arg_begin();
assert(n >= 0);
assert(
commit f66eec462348513932fa96ec74c29b054bd05a07
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jun 17 08:31:03 2014 +0200
rtl::Reference fits just fine here
Change-Id: I80fd6b112134ab2b0e4a592f60a21c7c177b4b01
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index 378d6f0..4d72dd3 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -26,7 +26,6 @@
#include <sfx2/viewsh.hxx>
#include <vcl/prntypes.hxx>
#include <svtools/transfer.hxx>
-#include <comphelper/implementationreference.hxx>
#include "glob.hxx"
#include "pres.hxx"
#include "cfgids.hxx"
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index e366864..1341953 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -80,7 +80,6 @@
#include <boost/bind.hpp>
using ::cppu::OInterfaceContainerHelper;
-using ::comphelper::ImplementationReference;
using ::com::sun::star::animations::XAnimationNode;
using ::com::sun::star::animations::XAnimationListener;
using ::com::sun::star::awt::XWindow;
@@ -630,7 +629,7 @@ void SAL_CALL SlideshowImpl::disposing()
try
{
if( mxView.is() )
- mxShow->removeView( mxView.getRef() );
+ mxShow->removeView( mxView.get() );
Reference< XComponent > xComponent( mxShow, UNO_QUERY );
if( xComponent.is() )
@@ -651,7 +650,7 @@ void SAL_CALL SlideshowImpl::disposing()
}
mxShow.clear();
- mxView.reset();
+ mxView.clear();
mxListenerProxy.clear();
mpSlideController.reset();
@@ -1119,12 +1118,12 @@ bool SlideshowImpl::startShowImpl( const Sequence< beans::PropertyValue >& aProp
try
{
mxShow = Reference< XSlideShow >( createSlideShow(), UNO_QUERY_THROW );
- mxView = comphelper::ImplementationReference<sd::SlideShowView, css::presentation::XSlideShowView>::createFromQuery( new SlideShowView(
+ mxView = new SlideShowView(
*mpShowWindow,
mpDoc,
meAnimationMode,
this,
- maPresSettings.mbFullScreen) );
+ maPresSettings.mbFullScreen);
// try add wait symbol to properties:
const Reference<rendering::XSpriteCanvas> xSpriteCanvas(
@@ -1163,7 +1162,7 @@ bool SlideshowImpl::startShowImpl( const Sequence< beans::PropertyValue >& aProp
for( nIndex = 0; nIndex < nCount; nIndex++ )
mxShow->setProperty( aProperties[nIndex] );
- mxShow->addView( mxView.getRef() );
+ mxShow->addView( mxView.get() );
mxListenerProxy.set( new SlideShowListenerProxy( this, mxShow ) );
mxListenerProxy->addAsSlideShowListener();
diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx
index 074b667..8d54e5d 100644
--- a/sd/source/ui/slideshow/slideshowimpl.hxx
+++ b/sd/source/ui/slideshow/slideshowimpl.hxx
@@ -332,7 +332,7 @@ private:
sal_Int32 updateSlideShow (void);
css::uno::Reference< css::presentation::XSlideShow > mxShow;
- comphelper::ImplementationReference< ::sd::SlideShowView, css::presentation::XSlideShowView > mxView;
+ rtl::Reference<sd::SlideShowView> mxView;
css::uno::Reference< css::frame::XModel > mxModel;
Timer maUpdateTimer;
diff --git a/sd/source/ui/slideshow/slideshowviewimpl.cxx b/sd/source/ui/slideshow/slideshowviewimpl.cxx
index 853a30f..30096f4 100644
--- a/sd/source/ui/slideshow/slideshowviewimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowviewimpl.cxx
@@ -43,7 +43,6 @@ using ::com::sun::star::presentation::XSlideShow;
using ::com::sun::star::presentation::XSlideShowView;
using ::com::sun::star::presentation::XShapeEventListener;
using ::com::sun::star::presentation::XSlideShowListener;
-using ::comphelper::ImplementationReference;
using namespace ::com::sun::star;
diff --git a/sd/source/ui/slideshow/slideshowviewimpl.hxx b/sd/source/ui/slideshow/slideshowviewimpl.hxx
index 3f87abf..fb01e7e 100644
--- a/sd/source/ui/slideshow/slideshowviewimpl.hxx
+++ b/sd/source/ui/slideshow/slideshowviewimpl.hxx
@@ -39,7 +39,6 @@
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#include <com/sun/star/animations/XAnimationNodeSupplier.hpp>
#include <com/sun/star/rendering/XSpriteCanvas.hpp>
-#include <comphelper/implementationreference.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/tools/canvastools.hxx>
#include <cppcanvas/spritecanvas.hxx>
diff --git a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
index 12ebbe2..d056b5a 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
@@ -29,7 +29,6 @@
#include <sfx2/viewfac.hxx>
#include <tools/link.hxx>
#include <tools/gen.hxx>
-#include <comphelper/implementationreference.hxx>
namespace sd { namespace slidesorter {
class SlideSorter;
@@ -241,8 +240,6 @@ private:
::boost::scoped_ptr<VisibleAreaManager> mpVisibleAreaManager;
// The listener listens to UNO events and thus is a UNO object.
- // For proper life time management and at the same time free access to
- // the implementation object we use the ImplementationReference class.
::rtl::Reference<controller::Listener> mpListener;
int mnModelChangeLockCount;
commit bf376444d992e7d1397cabd5b60e59c723ca8557
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Jun 16 16:18:33 2014 +0200
rtl::Reference fits just fine here
Change-Id: Id0a13af0c0d1aa0b6a21edde0ec7f97730a1c912
diff --git a/svx/inc/pch/precompiled_svxcore.hxx b/svx/inc/pch/precompiled_svxcore.hxx
index 7d33de6..fbe4945 100644
--- a/svx/inc/pch/precompiled_svxcore.hxx
+++ b/svx/inc/pch/precompiled_svxcore.hxx
@@ -425,7 +425,6 @@
#include <comphelper/extract.hxx>
#include <comphelper/flagguard.hxx>
#include <comphelper/genericpropertyset.hxx>
-#include <comphelper/implementationreference.hxx>
#include <comphelper/interaction.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/numbers.hxx>
diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx
index 8a70907..58dc19d 100644
--- a/svx/source/form/fmscriptingenv.cxx
+++ b/svx/source/form/fmscriptingenv.cxx
@@ -30,7 +30,6 @@
#include <tools/diagnose_ex.h>
#include <cppuhelper/implbase1.hxx>
-#include <comphelper/implementationreference.hxx>
#include <comphelper/processfactory.hxx>
#include <vcl/svapp.hxx>
#include <osl/mutex.hxx>
@@ -145,7 +144,7 @@ namespace svxform
public IFormScriptingEnvironment, private boost::noncopyable
{
private:
- typedef ::comphelper::ImplementationReference< FormScriptListener, XScriptListener > ListenerImplementation;
+ typedef rtl::Reference<FormScriptListener> ListenerImplementation;
private:
::osl::Mutex m_aMutex;
@@ -833,9 +832,9 @@ namespace svxform
try
{
if ( _bRegister )
- _rxManager->addScriptListener( m_pScriptListener.getRef() );
+ _rxManager->addScriptListener( m_pScriptListener.get() );
else
- _rxManager->removeScriptListener( m_pScriptListener.getRef() );
+ _rxManager->removeScriptListener( m_pScriptListener.get() );
}
catch( const RuntimeException& ) { throw; }
catch( const Exception& )
diff --git a/svx/source/inc/fmtextcontrolshell.hxx b/svx/source/inc/fmtextcontrolshell.hxx
index 9168135..a5ed157 100644
--- a/svx/source/inc/fmtextcontrolshell.hxx
+++ b/svx/source/inc/fmtextcontrolshell.hxx
@@ -27,7 +27,7 @@
#include <com/sun/star/form/runtime/XFormController.hpp>
#include <com/sun/star/awt/XControl.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
-#include <comphelper/implementationreference.hxx>
+#include <rtl/ref.hxx>
#include <tools/link.hxx>
#include <vcl/timer.hxx>
#include "fmslotinvalidator.hxx"
@@ -99,18 +99,15 @@ namespace svx
bool m_bActiveControlIsRichText;
// listening at all controls of the active controller for focus changes
- typedef ::comphelper::ImplementationReference< FmFocusListenerAdapter, ::com::sun::star::awt::XFocusListener >
- FocusListenerAdapter;
+ typedef rtl::Reference<FmFocusListenerAdapter> FocusListenerAdapter;
typedef ::std::vector< FocusListenerAdapter > FocusListenerAdapters;
FocusListenerAdapters m_aControlObservers;
- typedef ::comphelper::ImplementationReference< FmMouseListenerAdapter, ::com::sun::star::awt::XMouseListener >
- MouseListenerAdapter;
+ typedef rtl::Reference<FmMouseListenerAdapter> MouseListenerAdapter;
MouseListenerAdapter m_aContextMenuObserver;
// translating between "slots" of the framework and "features" of the active control
- typedef ::comphelper::ImplementationReference< FmTextControlFeature, ::com::sun::star::frame::XStatusListener >
- ControlFeature;
+ typedef rtl::Reference<FmTextControlFeature> ControlFeature;
typedef ::std::map< SfxSlotId, ControlFeature, ::std::less< SfxSlotId > > ControlFeatures;
ControlFeatures m_aControlFeatures;
commit 9489afdba6d234f5e5b0248df3afe0153794ab3e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Jun 16 16:13:08 2014 +0200
rtl::Reference fits just fine here
Change-Id: Icb1ba7f7068f60c4bd5eda7002415214b3d885f3
diff --git a/forms/source/component/ImageControl.hxx b/forms/source/component/ImageControl.hxx
index 2e85a59..4caaf90 100644
--- a/forms/source/component/ImageControl.hxx
+++ b/forms/source/component/ImageControl.hxx
@@ -27,7 +27,6 @@
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/graphic/XGraphicObject.hpp>
#include <comphelper/propmultiplex.hxx>
-#include <comphelper/implementationreference.hxx>
#include <cppuhelper/implbase2.hxx>
using namespace comphelper;
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx
index 60ec1f6..5ca9cac 100644
--- a/forms/source/richtext/richtextcontrol.cxx
+++ b/forms/source/richtext/richtextcontrol.cxx
@@ -683,7 +683,7 @@ namespace frm
}
if ( aDispatcherPos != m_aDispatchers.end() )
- xReturn = aDispatcherPos->second.getRef();
+ xReturn = aDispatcherPos->second.get();
}
}
diff --git a/forms/source/richtext/richtextcontrol.hxx b/forms/source/richtext/richtextcontrol.hxx
index 49da4ca..38dabbf 100644
--- a/forms/source/richtext/richtextcontrol.hxx
+++ b/forms/source/richtext/richtextcontrol.hxx
@@ -25,8 +25,8 @@
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <comphelper/uno3.hxx>
-#include <comphelper/implementationreference.hxx>
#include <cppuhelper/implbase1.hxx>
+#include <rtl/ref.hxx>
#include <tools/wintypes.hxx>
#include "rtattributes.hxx"
#include "attributedispatcher.hxx"
@@ -86,7 +86,7 @@ namespace frm
,public ITextSelectionListener
{
private:
- typedef ::comphelper::ImplementationReference< ORichTextFeatureDispatcher, ::com::sun::star::frame::XDispatch > SingleAttributeDispatcher;
+ typedef rtl::Reference<ORichTextFeatureDispatcher> SingleAttributeDispatcher;
typedef ::std::map< SfxSlotId, SingleAttributeDispatcher > AttributeDispatchers;
AttributeDispatchers m_aDispatchers;
More information about the Libreoffice-commits
mailing list