rsc/source/rscpp/cpp.h | 4 ++-- rsc/source/rscpp/cpp4.c | 4 ++-- rsc/source/rscpp/cpp6.c | 9 +++++---- 3 files changed, 9 insertions(+), 8 deletions(-)
New commits: commit 4bcfde41e7b854769f7db7412749d7f0f9ad977e Author: David Ostrovsky <da...@ostrovsky.org> Date: Sun Feb 8 04:27:11 2015 +0100 Werror: data lost during conversion from size_t to int Change-Id: Iee080b89cf0588c8076ef4c0334d36a7aefce44d Reviewed-on: https://gerrit.libreoffice.org/14374 Tested-by: Michael Stahl <mst...@redhat.com> Reviewed-by: Michael Stahl <mst...@redhat.com> diff --git a/rsc/source/rscpp/cpp.h b/rsc/source/rscpp/cpp.h old mode 100644 new mode 100755 index af579fe..c942141 --- a/rsc/source/rscpp/cpp.h +++ b/rsc/source/rscpp/cpp.h @@ -336,8 +336,8 @@ int scanstring( int c, void (*outfun)( int c ) ); void scannumber( int c, void (*outfun)( int c ) ); void save( int c ); char* savestring( char* text ); -FILEINFO* getfile( int bufsize, char* name ); -char *getmem( int size ); +FILEINFO* getfile( size_t bufsize, char* name ); +char *getmem( size_t size ); DEFBUF* lookid( int c ); DEFBUF* defendel( char* name, int delete ); void dunpdef( char* why ); diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c old mode 100644 new mode 100755 index 034c012..03f3560 --- a/rsc/source/rscpp/cpp4.c +++ b/rsc/source/rscpp/cpp4.c @@ -320,7 +320,7 @@ void doundef() */ void textput(char* text) { - int size; + size_t size; size = strlen(text) + 1; if ((parmp + size) >= &parm[NPARMWORK]) @@ -531,7 +531,7 @@ FILE_LOCAL void expstuff(DEFBUF* tokenp) int c; /* Current character */ char* inp; /* -> repl string */ char* defp; /* -> macro output buff */ - int size; /* Actual parm. size */ + size_t size; /* Actual parm. size */ char* defend; /* -> output buff end */ int string_magic; /* String formal hack */ FILEINFO* file; /* Funny #include */ diff --git a/rsc/source/rscpp/cpp6.c b/rsc/source/rscpp/cpp6.c old mode 100644 new mode 100755 index 6905612..9444b72 --- a/rsc/source/rscpp/cpp6.c +++ b/rsc/source/rscpp/cpp6.c @@ -485,7 +485,8 @@ char* savestring(char* text) { char* result; - result = getmem(strlen(text) + 1); + size_t size = strlen(text) + 1; + result = getmem(size); strcpy(result, text); return (result); } @@ -493,10 +494,10 @@ char* savestring(char* text) /* * Common FILEINFO buffer initialization for a new file or macro. */ -FILEINFO* getfile(int bufsize, char* name) +FILEINFO* getfile(size_t bufsize, char* name) { FILEINFO* file; - int size; + size_t size; size = strlen(name); /* File/macro name */ file = (FILEINFO*) getmem(sizeof (FILEINFO) + bufsize + size); @@ -518,7 +519,7 @@ FILEINFO* getfile(int bufsize, char* name) /* * Get a block of free memory. */ -char* getmem(int size) +char* getmem(size_t size) { char* result; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits