1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

Bug#29125 Windows Server X64: so many compiler warnings

- Remove bothersome warning messages.  This change focuses on the warnings 
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
This commit is contained in:
Ignacio Galarza
2009-02-13 11:41:47 -05:00
94 changed files with 241 additions and 240 deletions

View File

@@ -39,7 +39,7 @@
*/
static char *mstr(char *str,const char *src,uint l1,uint l2)
static char *mstr(char *str,const char *src,size_t l1,size_t l2)
{
l1= l1<l2 ? l1 : l2;
memcpy(str,src,l1);
@@ -143,7 +143,7 @@ typedef struct my_cs_file_info
static int fill_uchar(uchar *a,uint size,const char *str, uint len)
static int fill_uchar(uchar *a,uint size,const char *str, size_t len)
{
uint i= 0;
const char *s, *b, *e=str+len;

View File

@@ -108,7 +108,7 @@ size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
char *par = va_arg(ap, char *);
DBUG_ASSERT(to <= end);
if (to + abs(width) + 1 > end)
width= end - to - 1; /* sign doesn't matter */
width= (uint) (end - to - 1); /* sign doesn't matter */
memmove(to, par, abs(width));
to+= width;
continue;
@@ -176,7 +176,7 @@ size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
size_t my_snprintf(char* to, size_t n, const char* fmt, ...)
{
int result;
size_t result;
va_list args;
va_start(args,fmt);
result= my_vsnprintf(to, n, fmt, args);