mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-20 12:54:15 -04:00
Attempting to silence some more "checker" warnings.
This commit is contained in:
1 parent
1ba6468f1b
commit
aa0e6b9977
5 files changed
+14
-3
No files matched your search
+1
-1
@@ -505,7 +505,7 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
|
||||
if ((p = strstr(module_dir, "/./")) != NULL) {
|
||||
*p = '\0';
|
||||
p += 2;
|
||||
} else if ((p = strdup("/")) == NULL)
|
||||
} else if ((p = strdup("/")) == NULL) /* MEMORY LEAK */
|
||||
out_of_memory("rsync_module");
|
||||
}
|
||||
|
||||
|
||||
@@ -969,6 +969,12 @@ if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"
|
||||
fi
|
||||
fi
|
||||
|
||||
case "$CC" in
|
||||
checker*)
|
||||
AC_DEFINE(FORCE_FD_ZERO_MEMSET, 1, [Used to make "checker" understand that FD_ZERO() clears memory.])
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig])
|
||||
AC_OUTPUT
|
||||
|
||||
|
||||
@@ -341,7 +341,7 @@ static pid_t do_cmd(char *cmd, char *machine, char *user, char **remote_argv, in
|
||||
cmd = rsh_env;
|
||||
if (!cmd)
|
||||
cmd = RSYNC_RSH;
|
||||
cmd = strdup(cmd);
|
||||
cmd = strdup(cmd); /* MEMORY LEAK */
|
||||
if (!cmd)
|
||||
goto oom;
|
||||
|
||||
|
||||
@@ -1107,6 +1107,11 @@ size_t strlcat(char *d, const char *s, size_t bufsize);
|
||||
#define MY_GID() getgid()
|
||||
#endif
|
||||
|
||||
#ifdef FORCE_FD_ZERO_MEMSET
|
||||
#undef FD_ZERO
|
||||
#define FD_ZERO(fdsetp) memset(fdsetp, 0, sizeof (fd_set))
|
||||
#endif
|
||||
|
||||
extern int verbose;
|
||||
|
||||
#ifndef HAVE_INET_NTOP
|
||||
|
||||
@@ -167,7 +167,7 @@ int do_chmod(const char *path, mode_t mode)
|
||||
code = 1;
|
||||
#endif
|
||||
} else
|
||||
code = chmod(path, mode & CHMOD_BITS);
|
||||
code = chmod(path, mode & CHMOD_BITS); /* DISCOURAGED FUNCTION */
|
||||
if (code != 0 && (preserve_perms || preserve_executability))
|
||||
return code;
|
||||
return 0;
|
||||
|
||||
Reference in new issue
Block a user