diff options
-rw-r--r-- | cppuhelper/source/findsofficepath.c | 2 | ||||
-rw-r--r-- | include/rtl/locale.h | 2 | ||||
-rw-r--r-- | include/rtl/process.h | 2 | ||||
-rw-r--r-- | include/sal/main.h | 2 | ||||
-rw-r--r-- | odk/source/unoapploader/unx/unoapploader.c | 4 | ||||
-rw-r--r-- | rsc/source/rscpp/cpp.h | 46 | ||||
-rw-r--r-- | rsc/source/rscpp/cpp3.c | 2 | ||||
-rw-r--r-- | rsc/source/rscpp/cpp4.c | 4 | ||||
-rw-r--r-- | rsc/source/rscpp/cpp5.c | 4 | ||||
-rw-r--r-- | rsc/source/rscpp/cpp6.c | 2 | ||||
-rw-r--r-- | sal/osl/unx/pipe.c | 2 | ||||
-rw-r--r-- | sal/osl/unx/saltime.h | 2 | ||||
-rw-r--r-- | sal/osl/unx/signal.c | 6 | ||||
-rw-r--r-- | sal/osl/unx/socket.c | 2 | ||||
-rw-r--r-- | sal/osl/unx/time.c | 2 | ||||
-rw-r--r-- | shell/source/unix/misc/uri-encode.c | 2 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_GCC_defs.mk | 1 | ||||
-rw-r--r-- | soltools/mkdepend/cppsetup.c | 19 | ||||
-rw-r--r-- | soltools/mkdepend/def.h | 2 | ||||
-rw-r--r-- | soltools/mkdepend/ifparser.c | 60 | ||||
-rw-r--r-- | soltools/mkdepend/ifparser.h | 8 | ||||
-rw-r--r-- | soltools/mkdepend/include.c | 2 | ||||
-rw-r--r-- | soltools/mkdepend/main.c | 4 | ||||
-rw-r--r-- | soltools/mkdepend/parse.c | 3 | ||||
-rw-r--r-- | soltools/mkdepend/pr.c | 3 |
25 files changed, 69 insertions, 119 deletions
diff --git a/cppuhelper/source/findsofficepath.c b/cppuhelper/source/findsofficepath.c index 14ecacb91f62..f062d8f30e78 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 e302be41f0b1..e410e025a5e8 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 2213beab19eb..bd55a3a87dce 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 5d21b250b552..7c79fad5f0f9 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 5dc3abe874c5..48e36786b37c 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 260e5d59a68e..2a42f89ca5c1 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 40635ed9f951..81a5ac898a54 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 f82faacc9b56..d5af024bd717 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 09a1c5c4119a..14adf4fcec97 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 59708ef87d34..49d12dd7e192 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 10ac93238413..b0ee4324baff 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 001944f53904..735be7868d4b 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 93da6c67c6ab..d8d2190efdb0 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 d11297f6268b..fb6ced2ce77c 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 e80fd41aaab6..c474af6c1dd8 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 aba7f6232c12..f7bca6ff6a2e 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 8e9688825653..acfe2b43bea4 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 f4cdaa55eeb1..7d967741b14f 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 dcb3c1ff923d..94bc2553cb49 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 6518b1e5a974..f9b4b6639aea 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 a5dfbd38bfdd..c404e43631b1 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 dbdd1cffeb32..b3448d90c65d 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 b636498fc7e3..9b67e3717222 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 7d95f0ad3a51..bcc5b7ed6cde 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 6ebb01a05068..d02414d6f6b5 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); |