summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorAnurag Shekhar <anurag.shekhar@sun.com>2009-08-31 13:02:31 +0530
committerAnurag Shekhar <anurag.shekhar@sun.com>2009-08-31 13:02:31 +0530
commitdf51d1cea08e948bbf3aa0484af6251d79a32203 (patch)
tree9825757a345c9b7a8d1ef3beb7fb3399b6b5951b /mysys
parent11dd1d6d84a6214eff61e2efd6c73369bb44adbc (diff)
parent1ba25ae47caace207cda0be2b7994a1a845e6cce (diff)
downloadmariadb-git-df51d1cea08e948bbf3aa0484af6251d79a32203.tar.gz
merging with changes in bugteam branch.
Diffstat (limited to 'mysys')
-rw-r--r--mysys/mf_pack.c3
-rw-r--r--mysys/my_copy.c5
-rw-r--r--mysys/my_getopt.c2
-rw-r--r--mysys/my_redel.c3
-rw-r--r--mysys/typelib.c4
5 files changed, 9 insertions, 8 deletions
diff --git a/mysys/mf_pack.c b/mysys/mf_pack.c
index 0157a65311a..d2bac95b391 100644
--- a/mysys/mf_pack.c
+++ b/mysys/mf_pack.c
@@ -33,12 +33,11 @@ static my_string NEAR_F expand_tilde(my_string *path);
void pack_dirname(my_string to, const char *from)
{
int cwd_err;
- uint d_length,length,buff_length;
+ uint d_length,length,UNINIT_VAR(buff_length);
my_string start;
char buff[FN_REFLEN];
DBUG_ENTER("pack_dirname");
- LINT_INIT(buff_length);
(void) intern_filename(to,from); /* Change to intern name */
#ifdef FN_DEVCHAR
diff --git a/mysys/my_copy.c b/mysys/my_copy.c
index ec642b4083c..b6bb925e898 100644
--- a/mysys/my_copy.c
+++ b/mysys/my_copy.c
@@ -57,6 +57,7 @@ int my_copy(const char *from, const char *to, myf MyFlags)
File from_file,to_file;
char buff[IO_SIZE];
MY_STAT stat_buff,new_stat_buff;
+ int res;
DBUG_ENTER("my_copy");
DBUG_PRINT("my",("from %s to %s MyFlags %d", from, to, MyFlags));
@@ -93,9 +94,9 @@ int my_copy(const char *from, const char *to, myf MyFlags)
if (MyFlags & MY_HOLD_ORIGINAL_MODES && !new_file_stat)
DBUG_RETURN(0); /* File copyed but not stat */
- VOID(chmod(to, stat_buff.st_mode & 07777)); /* Copy modes */
+ res= chmod(to, stat_buff.st_mode & 07777); /* Copy modes */
#if !defined(MSDOS) && !defined(__WIN__) && !defined(__EMX__) && !defined(OS2) && !defined(__NETWARE__)
- VOID(chown(to, stat_buff.st_uid,stat_buff.st_gid)); /* Copy ownership */
+ res= chown(to, stat_buff.st_uid,stat_buff.st_gid); /* Copy ownership */
#endif
#if !defined(VMS) && !defined(__ZTC__)
if (MyFlags & MY_COPYTIME)
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index 3bb500616a1..22b404bdd25 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -100,7 +100,7 @@ int handle_options(int *argc, char ***argv,
uint opt_found, argvpos= 0, length, i;
my_bool end_of_options= 0, must_be_var, set_maximum_value,
option_is_loose;
- char **pos, **pos_end, *optend, *prev_found,
+ char **pos, **pos_end, *optend, *UNINIT_VAR(prev_found),
*opt_str, key_name[FN_REFLEN];
const struct my_option *optp;
gptr *value;
diff --git a/mysys/my_redel.c b/mysys/my_redel.c
index 0aec395cf65..03c1021a954 100644
--- a/mysys/my_redel.c
+++ b/mysys/my_redel.c
@@ -77,6 +77,7 @@ end:
int my_copystat(const char *from, const char *to, int MyFlags)
{
struct stat statbuf;
+ int res;
if (stat((char*) from, &statbuf))
{
@@ -95,7 +96,7 @@ int my_copystat(const char *from, const char *to, int MyFlags)
if (MyFlags & MY_LINK_WARNING)
my_error(EE_LINK_WARNING,MYF(ME_BELL+ME_WAITTANG),from,statbuf.st_nlink);
}
- VOID(chown(to, statbuf.st_uid, statbuf.st_gid)); /* Copy ownership */
+ res= chown(to, statbuf.st_uid, statbuf.st_gid); /* Copy ownership */
#endif /* MSDOS */
#ifndef VMS
diff --git a/mysys/typelib.c b/mysys/typelib.c
index 4fab6f20493..7416738ece7 100644
--- a/mysys/typelib.c
+++ b/mysys/typelib.c
@@ -44,7 +44,8 @@
int find_type(my_string x, TYPELIB *typelib, uint full_name)
{
- int find,pos,findpos;
+ int find,pos;
+ int UNINIT_VAR(findpos); /* guarded by find */
reg1 my_string i;
reg2 const char *j;
DBUG_ENTER("find_type");
@@ -55,7 +56,6 @@ int find_type(my_string x, TYPELIB *typelib, uint full_name)
DBUG_PRINT("exit",("no count"));
DBUG_RETURN(0);
}
- LINT_INIT(findpos);
find=0;
for (pos=0 ; (j=typelib->type_names[pos]) ; pos++)
{