summaryrefslogtreecommitdiff
path: root/mysys/mf_iocache2.c
diff options
context:
space:
mode:
authormonty@mysql.com/narttu.mysql.fi <>2006-12-15 00:51:37 +0200
committermonty@mysql.com/narttu.mysql.fi <>2006-12-15 00:51:37 +0200
commit88dd873de0d5dc6e8f262268f925596a60b58704 (patch)
tree142bd488523fec48817d9fb2194f1a608eec00fc /mysys/mf_iocache2.c
parent601e6f4b2a78921304bc1d779991c615ee229f89 (diff)
downloadmariadb-git-88dd873de0d5dc6e8f262268f925596a60b58704.tar.gz
Fixed compiler warnings detected by option -Wshadow and -Wunused:
- Removed not used variables and functions - Added #ifdef around code that is not used - Renamed variables and functions to avoid conflicts - Removed some not used arguments Fixed some class/struct warnings in ndb Added define IS_LONGDATA() to simplify code in libmysql.c I did run gcov on the changes and added 'purecov' comments on almost all lines that was not just variable name changes
Diffstat (limited to 'mysys/mf_iocache2.c')
-rw-r--r--mysys/mf_iocache2.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/mysys/mf_iocache2.c b/mysys/mf_iocache2.c
index f1ea21c2a47..1afa2dd6e10 100644
--- a/mysys/mf_iocache2.c
+++ b/mysys/mf_iocache2.c
@@ -322,10 +322,10 @@ uint my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args)
if (*fmt == 's') /* String parameter */
{
reg2 char *par = va_arg(args, char *);
- uint length = (uint) strlen(par);
+ uint length2 = (uint) strlen(par);
/* TODO: implement minimum width and precision */
- out_length+=length;
- if (my_b_write(info, par, length))
+ out_length+= length2;
+ if (my_b_write(info, par, length2))
goto err;
}
else if (*fmt == 'b') /* Sized buffer parameter, only precision makes sense */
@@ -338,32 +338,32 @@ uint my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args)
else if (*fmt == 'd' || *fmt == 'u') /* Integer parameter */
{
register int iarg;
- uint length;
+ uint length2;
char buff[17];
iarg = va_arg(args, int);
if (*fmt == 'd')
- length= (uint) (int10_to_str((long) iarg,buff, -10) - buff);
+ length2= (uint) (int10_to_str((long) iarg,buff, -10) - buff);
else
- length= (uint) (int10_to_str((long) (uint) iarg,buff,10)- buff);
- out_length+=length;
- if (my_b_write(info, buff, length))
+ length2= (uint) (int10_to_str((long) (uint) iarg,buff,10)- buff);
+ out_length+= length2;
+ if (my_b_write(info, buff, length2))
goto err;
}
else if ((*fmt == 'l' && fmt[1] == 'd') || fmt[1] == 'u')
/* long parameter */
{
register long iarg;
- uint length;
+ uint length2;
char buff[17];
iarg = va_arg(args, long);
if (*++fmt == 'd')
- length= (uint) (int10_to_str(iarg,buff, -10) - buff);
+ length2= (uint) (int10_to_str(iarg,buff, -10) - buff);
else
- length= (uint) (int10_to_str(iarg,buff,10)- buff);
- out_length+=length;
- if (my_b_write(info, buff, length))
+ length2= (uint) (int10_to_str(iarg,buff,10)- buff);
+ out_length+= length2;
+ if (my_b_write(info, buff, length2))
goto err;
}
else