On Wednesday, June 27, 2018 12:02:07 PM CEST Pádraig Brady wrote:
> We plan to release coreutils-8.30 in the coming week
> so any testing you can do on various different systems between now and then
> would be most welcome.
> 
> --------------------------------------
> 
> You can download the coreutils snapshot in xz format (5.3 MB) from:
>   https://pixelbeat.org/cu/coreutils-ss.tar.xz
> 
> And verify with gpg or md5sum with:
>   https://pixelbeat.org/cu/coreutils-ss.tar.xz.sig
>   MD5 (coreutils-ss.tar.xz) = 3ce92d2c8da2842328415dab8d1f4bbc

I am getting many warnings from static analyzers about uses of uninitialized 
stat buffer in the copy_internal() function.  I think it is related to the 
optimization of stat() calls implemented by Paul recently.

If you think that the reported code paths are not feasible, please make
the buffer at least explicitly initialized to make sure that it behaves 
predictably in all corner cases.

Details attached.

Kamil

> --------------------------------------
> 
> To test follow this standard procedure:
> 
>   tar -xf coreutils-ss.tar.xz
>   cd coreutils-8.29.64-1755f/
>   ./configure && make check VERBOSE=yes
> 
> Failures are reported and details are in tests/test-suite.log
> 
> --------------------------------------
> 
> Changes since the previous snapshot are:
> 
> commit 1755ffb7b607c1870ce7e7cbcc867895e0c2c262
> Author: Pádraig Brady <p...@draigbrady.com>
> Date:   Wed Jun 27 01:44:51 2018 -0700
> 
>     maint: disable overly aggressive sc_gitignore_redundant
> 
>     * cfg.mk (sc_gitignore_redundant): Disabled for now as too
>     aggressive flagging entries like /lib/arg-nonnull.h in
>     a newly checked out repo.
> 
> commit a68efd128328e14b802032a5c6c585528b6d5b8e
> Author: Pádraig Brady <p...@draigbrady.com>
> Date:   Tue Jun 26 23:52:38 2018 -0700
> 
>     env: adjust diagnostics provided for shebang usage
> 
>     * src/env.c (main): Don't process '-' specially since
>     that causes an issue on the openbsd getopt implementation
>     where a lone '-' is now processed as an option, and anyway
>     it doesn't particuarly help diagnosing common shebang
>     usage issues.  Also don't restrict the extra diagnostics
>     for shebang usage to the case with 3 arguments, as
>     further arguments can be passed to a script.
>     * tests/misc/env-S.pl: Adjust accordingly.
> 
> commit 4b7595d751872442d043f6116a453d3b43b3253d
> Author: Assaf Gordon <assafgor...@gmail.com>
> Date:   Tue Jun 26 05:04:45 2018 -0600
> 
>     tests: accept getopt errors without single-quotes
> 
>     On OpenBSD 6.2, invalid single options produce error messages
>     without single quotes:
> 
>         $ ./src/chroot -/
>         chroot: unknown option -- /
> 
>     As opposed to other systems:
> 
>         ./src/chroot: invalid option -- '/'
> 
>     Modify the grep search to accept this.
> 
>     * tests/misc/usage_vs_getopt.sh (checkprg): Change the grep pattern
>     to accomodate no-single-quotes cases.
> 
> commit d542945c3a8198096fc018f56c2ff7338e1405c7
> Author: Pádraig Brady <p...@draigbrady.com>
> Date:   Tue Jun 26 00:43:00 2018 -0700
> 
>     tests: fix false failures when perl not available
> 
>     * tests/local.mk: Reference the stub that skips perl tests,
>     with the correct path.
> 
> commit 6d6095f33a108493e76daa8221a08bb403a3ea7d
> Author: Pádraig Brady <p...@draigbrady.com>
> Date:   Tue Jun 26 00:39:48 2018 -0700
> 
>     tests: fix false failure with limited shebang lines
> 
>     * tests/misc/env-S-script.sh: Provide a wrapper to
>     emulate shebang processing, but without length limits,
>     which are 127 on Linux for example.
> 
> commit 91d78a570ffee4eeb87b8030690c39de99748239
> Author: Pádraig Brady <p...@draigbrady.com>
> Date:   Wed Jun 27 00:48:03 2018 -0700
> 
>     maint: update gnulib to latest
> 
>     * gnulib: Update to latest, which incorporates
>     a thread linking fix from Bruno Haible,
>     which was seen on newer Ubuntu systems.
> 
> commit 3e5dcddba7466d5d594cd39cc0b543224a7def4a
> Author: Assaf Gordon <assafgor...@gmail.com>
> Date:   Tue Jun 26 12:59:11 2018 -0600
> 
>     tests: remove unused Data::Dumper perl module
> 
>     The module is not needed anymore (was used during development).
>     Despite being a Perl core module, platforms like CentOS don't install
>     it by default.  Reported by Bruno Haible at
>     https://lists.gnu.org/r/coreutils/2018-06/msg00093.html.
> 
>     * tests/misc/csplit-suppress-matched.pl: Remove Data::Dumper.
> 
> thanks,
> Pádraig

Error: UNINIT (CWE-457):
coreutils-8.29.64-1755f/src/copy.c:1856: var_decl: Declaring variable "src_sb" 
without initializer.
coreutils-8.29.64-1755f/src/copy.c:1873: cond_true: Condition "x->move_mode", 
taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1875: cond_true: Condition "rename_errno < 
0", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1876: cond_false: Condition "renameat2(-100, 
src_name, -100, dst_name, 1U /* 1 << 0 */)", taking false branch.
coreutils-8.29.64-1755f/src/copy.c:1879: cond_true: Condition "rename_errno == 
0", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1879: cond_true: Condition "rename_errno == 
0", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1880: cond_true: Condition 
"rename_succeeded", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1884: cond_true: Condition "rename_errno == 
0", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1884: cond_false: Condition "!x->last_file", 
taking false branch.
coreutils-8.29.64-1755f/src/copy.c:1884: cond_false: Condition "(rename_errno 
== 0) ? !x->last_file : (rename_errno != 17 || x->interactive != I_ALWAYS_NO)", 
taking false branch.
coreutils-8.29.64-1755f/src/copy.c:1905: if_end: End of if statement.
coreutils-8.29.64-1755f/src/copy.c:1911: cond_true: Condition 
"command_line_arg", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1911: cond_true: Condition "x->src_info", 
taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1913: uninit_use: Using uninitialized value 
"src_sb.st_mode".
# 1911|     if (command_line_arg && x->src_info)
# 1912|       {
# 1913|->       if ( ! S_ISDIR (src_sb.st_mode)
# 1914|              && x->backup_type == no_backups
# 1915|              && seen_file (x->src_info, src_name, &src_sb))

Error: UNINIT (CWE-457):
coreutils-8.29.64-1755f/src/copy.c:1856: var_decl: Declaring variable "src_sb" 
without initializer.
coreutils-8.29.64-1755f/src/copy.c:1873: cond_true: Condition "x->move_mode", 
taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1875: cond_true: Condition "rename_errno < 
0", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1876: cond_false: Condition "renameat2(-100, 
src_name, -100, dst_name, 1U /* 1 << 0 */)", taking false branch.
coreutils-8.29.64-1755f/src/copy.c:1879: cond_true: Condition "rename_errno == 
0", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1879: cond_true: Condition "rename_errno == 
0", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1880: cond_true: Condition 
"rename_succeeded", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1884: cond_true: Condition "rename_errno == 
0", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1884: cond_false: Condition "!x->last_file", 
taking false branch.
coreutils-8.29.64-1755f/src/copy.c:1884: cond_false: Condition "(rename_errno 
== 0) ? !x->last_file : (rename_errno != 17 || x->interactive != I_ALWAYS_NO)", 
taking false branch.
coreutils-8.29.64-1755f/src/copy.c:1905: if_end: End of if statement.
coreutils-8.29.64-1755f/src/copy.c:1911: cond_true: Condition 
"command_line_arg", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1911: cond_true: Condition "x->src_info", 
taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1913: cond_true: Condition 
"!((src_sb.st_mode & 61440) == 16384)", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1913: cond_true: Condition "x->backup_type 
== no_backups", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1913: uninit_use_in_call: Using 
uninitialized value "src_sb.st_dev" when calling "seen_file".
coreutils-8.29.64-1755f/lib/file-set.c:66:3: cond_false: Condition "ht == 
NULL", taking false branch.
coreutils-8.29.64-1755f/lib/file-set.c:67:5: if_end: End of if statement.
coreutils-8.29.64-1755f/lib/file-set.c:71:3: read_parm_fld: Reading a parameter 
field.
coreutils-8.29.64-1755f/src/copy.c:1913: uninit_use_in_call: Using 
uninitialized value "src_sb.st_ino" when calling "seen_file".
coreutils-8.29.64-1755f/lib/file-set.c:66:3: cond_false: Condition "ht == 
NULL", taking false branch.
coreutils-8.29.64-1755f/lib/file-set.c:67:5: if_end: End of if statement.
coreutils-8.29.64-1755f/lib/file-set.c:70:3: read_parm_fld: Reading a parameter 
field.
# 1911|     if (command_line_arg && x->src_info)
# 1912|       {
# 1913|->       if ( ! S_ISDIR (src_sb.st_mode)
# 1914|              && x->backup_type == no_backups
# 1915|              && seen_file (x->src_info, src_name, &src_sb))

Error: CLANG_WARNING:
coreutils-8.29.64-1755f/src/copy.c:1913:14: warning: The left operand of '&' is 
a garbage value
#      if ( ! S_ISDIR (src_sb.st_mode)
#             ^
/usr/include/sys/stat.h:125:24: note: expanded from macro 'S_ISDIR'
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^
/usr/include/sys/stat.h:123:41: note: expanded from macro '__S_ISTYPE'
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                         ^
coreutils-8.29.64-1755f/src/copy.c:1873:7: note: Assuming the condition is false
#  if (x->move_mode)
#      ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: Assuming 'rename_errno' is not 
equal to 0
#  if (rename_errno == 0
#      ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: '?' condition is false
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Assuming 'rename_errno' is 
equal to EEXIST
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#        ^~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Left side of '||' is false
coreutils-8.29.64-1755f/src/copy.c:1886:35: note: Assuming the condition is 
false
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:3: note: Taking false branch
#  if (rename_errno == 0
#  ^
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Assuming 'command_line_arg' is 
not equal to 0
#  if (command_line_arg && x->src_info)
#      ^~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Left side of '&&' is true
coreutils-8.29.64-1755f/src/copy.c:1911:27: note: Assuming the condition is true
#  if (command_line_arg && x->src_info)
#                          ^~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:3: note: Taking true branch
#  if (command_line_arg && x->src_info)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1913:14: note: The left operand of '&' is a 
garbage value
#      if ( ! S_ISDIR (src_sb.st_mode)
#             ^        ~~~~~~~~~~~~~~
/usr/include/sys/stat.h:125:24: note: expanded from macro 'S_ISDIR'
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^           ~~~~
/usr/include/sys/stat.h:123:41: note: expanded from macro '__S_ISTYPE'
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                   ~~~~  ^
# 1911|     if (command_line_arg && x->src_info)
# 1912|       {
# 1913|->       if ( ! S_ISDIR (src_sb.st_mode)
# 1914|              && x->backup_type == no_backups
# 1915|              && seen_file (x->src_info, src_name, &src_sb))

Error: UNINIT (CWE-457):
coreutils-8.29.64-1755f/src/copy.c:1856: var_decl: Declaring variable "src_sb" 
without initializer.
coreutils-8.29.64-1755f/src/copy.c:1873: cond_true: Condition "x->move_mode", 
taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1875: cond_true: Condition "rename_errno < 
0", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1876: cond_false: Condition "renameat2(-100, 
src_name, -100, dst_name, 1U /* 1 << 0 */)", taking false branch.
coreutils-8.29.64-1755f/src/copy.c:1879: cond_true: Condition "rename_errno == 
0", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1879: cond_true: Condition "rename_errno == 
0", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1880: cond_true: Condition 
"rename_succeeded", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1884: cond_true: Condition "rename_errno == 
0", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1884: cond_false: Condition "!x->last_file", 
taking false branch.
coreutils-8.29.64-1755f/src/copy.c:1884: cond_false: Condition "(rename_errno 
== 0) ? !x->last_file : (rename_errno != 17 || x->interactive != I_ALWAYS_NO)", 
taking false branch.
coreutils-8.29.64-1755f/src/copy.c:1905: if_end: End of if statement.
coreutils-8.29.64-1755f/src/copy.c:1911: cond_true: Condition 
"command_line_arg", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1911: cond_true: Condition "x->src_info", 
taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1913: cond_true: Condition 
"!((src_sb.st_mode & 61440) == 16384)", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1913: cond_false: Condition "x->backup_type 
== no_backups", taking false branch.
coreutils-8.29.64-1755f/src/copy.c:1920: if_end: End of if statement.
coreutils-8.29.64-1755f/src/copy.c:1922: uninit_use_in_call: Using 
uninitialized value "src_sb.st_dev" when calling "record_file".
coreutils-8.29.64-1755f/lib/file-set.c:33:3: cond_false: Condition "ht == 
NULL", taking false branch.
coreutils-8.29.64-1755f/lib/file-set.c:34:5: if_end: End of if statement.
coreutils-8.29.64-1755f/lib/file-set.c:39:3: read_parm_fld: Reading a parameter 
field.
coreutils-8.29.64-1755f/src/copy.c:1922: uninit_use_in_call: Using 
uninitialized value "src_sb.st_ino" when calling "record_file".
coreutils-8.29.64-1755f/lib/file-set.c:33:3: cond_false: Condition "ht == 
NULL", taking false branch.
coreutils-8.29.64-1755f/lib/file-set.c:34:5: if_end: End of if statement.
coreutils-8.29.64-1755f/lib/file-set.c:38:3: read_parm_fld: Reading a parameter 
field.
# 1920|           }
# 1921|   
# 1922|->       record_file (x->src_info, src_name, &src_sb);
# 1923|       }
# 1924|   

Error: CLANG_WARNING:
coreutils-8.29.64-1755f/src/copy.c:1977:29: warning: The left operand of '&' is 
a garbage value
#          if (x->update && !S_ISDIR (src_mode))
#                            ^
/usr/include/sys/stat.h:125:24: note: expanded from macro 'S_ISDIR'
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^
/usr/include/sys/stat.h:123:41: note: expanded from macro '__S_ISTYPE'
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                         ^
coreutils-8.29.64-1755f/src/copy.c:1858:3: note: 'src_mode' declared without an 
initial value
#  mode_t src_mode IF_LINT ( = 0);
#  ^~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:7: note: Assuming the condition is false
#  if (x->move_mode)
#      ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: Assuming 'rename_errno' is not 
equal to 0
#  if (rename_errno == 0
#      ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: '?' condition is false
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Assuming 'rename_errno' is 
equal to EEXIST
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#        ^~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Left side of '||' is false
coreutils-8.29.64-1755f/src/copy.c:1886:35: note: Assuming the condition is 
false
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:3: note: Taking false branch
#  if (rename_errno == 0
#  ^
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Assuming 'command_line_arg' is 0
#  if (command_line_arg && x->src_info)
#      ^~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:24: note: Left side of '&&' is false
#  if (command_line_arg && x->src_info)
#                       ^
coreutils-8.29.64-1755f/src/copy.c:1927:7: note: Assuming 'new_dst' is 0
#  if (!new_dst)
#      ^~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1927:3: note: Taking true branch
#  if (!new_dst)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1929:14: note: Left side of '&&' is true
#      if (! (rename_errno == EEXIST && x->interactive == I_ALWAYS_NO))
#             ^
coreutils-8.29.64-1755f/src/copy.c:1929:7: note: Taking false branch
#      if (! (rename_errno == EEXIST && x->interactive == I_ALWAYS_NO))
#      ^
coreutils-8.29.64-1755f/src/copy.c:1964:7: note: Taking true branch
#      if (rename_errno == EEXIST)
#      ^
coreutils-8.29.64-1755f/src/copy.c:1969:15: note: Left side of '&&' is false
#              && ! same_file_ok (src_name, &src_sb, dst_name, &dst_sb,
#              ^
coreutils-8.29.64-1755f/src/copy.c:1977:15: note: Assuming the condition is true
#          if (x->update && !S_ISDIR (src_mode))
#              ^~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1977:15: note: Left side of '&&' is true
coreutils-8.29.64-1755f/src/copy.c:1977:29: note: The left operand of '&' is a 
garbage value
#          if (x->update && !S_ISDIR (src_mode))
#                            ^        ~~~~~~~~
/usr/include/sys/stat.h:125:24: note: expanded from macro 'S_ISDIR'
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^           ~~~~
/usr/include/sys/stat.h:123:41: note: expanded from macro '__S_ISTYPE'
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                   ~~~~  ^
# 1975|               }
# 1976|   
# 1977|->           if (x->update && !S_ISDIR (src_mode))
# 1978|               {
# 1979|                 /* When preserving timestamps (but not moving within a 
file

Error: CLANG_WARNING:
coreutils-8.29.64-1755f/src/copy.c:2040:21: warning: The left operand of '&' is 
a garbage value
#              if (! S_ISDIR (src_mode)
#                    ^
/usr/include/sys/stat.h:125:24: note: expanded from macro 'S_ISDIR'
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^
/usr/include/sys/stat.h:123:41: note: expanded from macro '__S_ISTYPE'
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                         ^
coreutils-8.29.64-1755f/src/copy.c:1858:3: note: 'src_mode' declared without an 
initial value
#  mode_t src_mode IF_LINT ( = 0);
#  ^~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:7: note: Assuming the condition is false
#  if (x->move_mode)
#      ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: Assuming 'rename_errno' is not 
equal to 0
#  if (rename_errno == 0
#      ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: '?' condition is false
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Assuming 'rename_errno' is 
equal to EEXIST
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#        ^~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Left side of '||' is false
coreutils-8.29.64-1755f/src/copy.c:1886:35: note: Assuming the condition is 
false
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:3: note: Taking false branch
#  if (rename_errno == 0
#  ^
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Assuming 'command_line_arg' is 0
#  if (command_line_arg && x->src_info)
#      ^~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:24: note: Left side of '&&' is false
#  if (command_line_arg && x->src_info)
#                       ^
coreutils-8.29.64-1755f/src/copy.c:1927:7: note: Assuming 'new_dst' is 0
#  if (!new_dst)
#      ^~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1927:3: note: Taking true branch
#  if (!new_dst)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1929:14: note: Left side of '&&' is true
#      if (! (rename_errno == EEXIST && x->interactive == I_ALWAYS_NO))
#             ^
coreutils-8.29.64-1755f/src/copy.c:1929:7: note: Taking false branch
#      if (! (rename_errno == EEXIST && x->interactive == I_ALWAYS_NO))
#      ^
coreutils-8.29.64-1755f/src/copy.c:1964:7: note: Taking true branch
#      if (rename_errno == EEXIST)
#      ^
coreutils-8.29.64-1755f/src/copy.c:1969:15: note: Left side of '&&' is false
#              && ! same_file_ok (src_name, &src_sb, dst_name, &dst_sb,
#              ^
coreutils-8.29.64-1755f/src/copy.c:1977:15: note: Assuming the condition is 
false
#          if (x->update && !S_ISDIR (src_mode))
#              ^~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1977:25: note: Left side of '&&' is false
#          if (x->update && !S_ISDIR (src_mode))
#                        ^
coreutils-8.29.64-1755f/src/copy.c:2027:11: note: Taking false branch
#          if (x->move_mode)
#          ^
coreutils-8.29.64-1755f/src/copy.c:2040:21: note: The left operand of '&' is a 
garbage value
#              if (! S_ISDIR (src_mode)
#                    ^        ~~~~~~~~
/usr/include/sys/stat.h:125:24: note: expanded from macro 'S_ISDIR'
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^           ~~~~
/usr/include/sys/stat.h:123:41: note: expanded from macro '__S_ISTYPE'
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                   ~~~~  ^
# 2038|             else
# 2039|               {
# 2040|->               if (! S_ISDIR (src_mode)
# 2041|                     && (x->interactive == I_ALWAYS_NO
# 2042|                         || (x->interactive == I_ASK_USER

Error: CLANG_WARNING:
coreutils-8.29.64-1755f/src/copy.c:2226:39: warning: The left operand of '&' is 
a garbage value
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#                                      ^
/usr/include/sys/stat.h:125:24: note: expanded from macro 'S_ISDIR'
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^
/usr/include/sys/stat.h:123:41: note: expanded from macro '__S_ISTYPE'
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                         ^
coreutils-8.29.64-1755f/src/copy.c:1858:3: note: 'src_mode' declared without an 
initial value
#  mode_t src_mode IF_LINT ( = 0);
#  ^~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:7: note: Assuming the condition is false
#  if (x->move_mode)
#      ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: Assuming 'rename_errno' is not 
equal to 0
#  if (rename_errno == 0
#      ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: '?' condition is false
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Assuming 'rename_errno' is 
equal to EEXIST
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#        ^~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Left side of '||' is false
coreutils-8.29.64-1755f/src/copy.c:1886:35: note: Assuming the condition is 
false
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:3: note: Taking false branch
#  if (rename_errno == 0
#  ^
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Assuming 'command_line_arg' is 0
#  if (command_line_arg && x->src_info)
#      ^~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:24: note: Left side of '&&' is false
#  if (command_line_arg && x->src_info)
#                       ^
coreutils-8.29.64-1755f/src/copy.c:1927:7: note: Assuming 'new_dst' is not 
equal to 0
#  if (!new_dst)
#      ^~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1927:3: note: Taking false branch
#  if (!new_dst)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2190:7: note: Left side of '&&' is false
#      && x->dest_info
#      ^
coreutils-8.29.64-1755f/src/copy.c:2226:7: note: Assuming the condition is true
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#      ^~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2226:7: note: Left side of '&&' is true
coreutils-8.29.64-1755f/src/copy.c:2226:7: note: Left side of '&&' is true
coreutils-8.29.64-1755f/src/copy.c:2226:39: note: The left operand of '&' is a 
garbage value
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#                                      ^        ~~~~~~~~
/usr/include/sys/stat.h:125:24: note: expanded from macro 'S_ISDIR'
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^           ~~~~
/usr/include/sys/stat.h:123:41: note: expanded from macro '__S_ISTYPE'
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                   ~~~~  ^
# 2224|        sure we'll create a directory.  Also don't announce yet when 
moving
# 2225|        so we can distinguish renames versus copies.  */
# 2226|->   if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
# 2227|       emit_verbose (src_name, dst_name, dst_backup);
# 2228|   

Error: CLANG_WARNING:
coreutils-8.29.64-1755f/src/copy.c:2261:28: warning: The left operand of '&' is 
a garbage value
#  else if (x->recursive && S_ISDIR (src_mode))
#                           ^
/usr/include/sys/stat.h:125:24: note: expanded from macro 'S_ISDIR'
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^
/usr/include/sys/stat.h:123:41: note: expanded from macro '__S_ISTYPE'
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                         ^
coreutils-8.29.64-1755f/src/copy.c:1858:3: note: 'src_mode' declared without an 
initial value
#  mode_t src_mode IF_LINT ( = 0);
#  ^~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:7: note: Assuming the condition is false
#  if (x->move_mode)
#      ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: Assuming 'rename_errno' is not 
equal to 0
#  if (rename_errno == 0
#      ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: '?' condition is false
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Assuming 'rename_errno' is 
equal to EEXIST
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#        ^~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Left side of '||' is false
coreutils-8.29.64-1755f/src/copy.c:1886:35: note: Assuming the condition is 
false
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:3: note: Taking false branch
#  if (rename_errno == 0
#  ^
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Assuming 'command_line_arg' is 0
#  if (command_line_arg && x->src_info)
#      ^~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:24: note: Left side of '&&' is false
#  if (command_line_arg && x->src_info)
#                       ^
coreutils-8.29.64-1755f/src/copy.c:1927:7: note: Assuming 'new_dst' is not 
equal to 0
#  if (!new_dst)
#      ^~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1927:3: note: Taking false branch
#  if (!new_dst)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2190:7: note: Left side of '&&' is false
#      && x->dest_info
#      ^
coreutils-8.29.64-1755f/src/copy.c:2226:7: note: Assuming the condition is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#      ^~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2226:18: note: Left side of '&&' is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#                 ^
coreutils-8.29.64-1755f/src/copy.c:2259:3: note: Taking false branch
#  if (rename_errno == 0)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2261:12: note: Assuming the condition is true
#  else if (x->recursive && S_ISDIR (src_mode))
#           ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2261:12: note: Left side of '&&' is true
coreutils-8.29.64-1755f/src/copy.c:2261:28: note: The left operand of '&' is a 
garbage value
#  else if (x->recursive && S_ISDIR (src_mode))
#                           ^        ~~~~~~~~
/usr/include/sys/stat.h:125:24: note: expanded from macro 'S_ISDIR'
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^           ~~~~
/usr/include/sys/stat.h:123:41: note: expanded from macro '__S_ISTYPE'
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                   ~~~~  ^
# 2259|     if (rename_errno == 0)
# 2260|       earlier_file = NULL;
# 2261|->   else if (x->recursive && S_ISDIR (src_mode))
# 2262|       {
# 2263|         if (command_line_arg)

Error: CLANG_WARNING:
coreutils-8.29.64-1755f/src/copy.c:2274:18: warning: The right operand of '<' 
is a garbage value
#           && (1 < src_sb.st_nlink
#                 ^ ~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:7: note: Assuming the condition is false
#  if (x->move_mode)
#      ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: Assuming 'rename_errno' is not 
equal to 0
#  if (rename_errno == 0
#      ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: '?' condition is false
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Assuming 'rename_errno' is 
equal to EEXIST
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#        ^~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Left side of '||' is false
coreutils-8.29.64-1755f/src/copy.c:1886:35: note: Assuming the condition is 
false
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:3: note: Taking false branch
#  if (rename_errno == 0
#  ^
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Assuming 'command_line_arg' is 0
#  if (command_line_arg && x->src_info)
#      ^~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:24: note: Left side of '&&' is false
#  if (command_line_arg && x->src_info)
#                       ^
coreutils-8.29.64-1755f/src/copy.c:1927:7: note: Assuming 'new_dst' is not 
equal to 0
#  if (!new_dst)
#      ^~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1927:3: note: Taking false branch
#  if (!new_dst)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2190:7: note: Left side of '&&' is false
#      && x->dest_info
#      ^
coreutils-8.29.64-1755f/src/copy.c:2226:7: note: Assuming the condition is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#      ^~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2226:18: note: Left side of '&&' is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#                 ^
coreutils-8.29.64-1755f/src/copy.c:2259:3: note: Taking false branch
#  if (rename_errno == 0)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2261:12: note: Assuming the condition is 
false
#  else if (x->recursive && S_ISDIR (src_mode))
#           ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2261:25: note: Left side of '&&' is false
#  else if (x->recursive && S_ISDIR (src_mode))
#                        ^
coreutils-8.29.64-1755f/src/copy.c:2268:25: note: Left side of '&&' is false
#  else if (x->move_mode && src_sb.st_nlink == 1)
#                        ^
coreutils-8.29.64-1755f/src/copy.c:2272:12: note: Assuming the condition is true
#  else if (x->preserve_links
#           ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2272:12: note: Left side of '&&' is true
coreutils-8.29.64-1755f/src/copy.c:2273:15: note: Assuming the condition is true
#           && !x->hard_link
#              ^~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2272:12: note: Left side of '&&' is true
#  else if (x->preserve_links
#           ^
coreutils-8.29.64-1755f/src/copy.c:2274:18: note: The right operand of '<' is a 
garbage value
#           && (1 < src_sb.st_nlink
#                 ^ ~~~~~~~~~~~~~~~
# 2272|     else if (x->preserve_links
# 2273|              && !x->hard_link
# 2274|->            && (1 < src_sb.st_nlink
# 2275|                  || (command_line_arg
# 2276|                      && x->dereference == DEREF_COMMAND_LINE_ARGUMENTS)

Error: CLANG_WARNING:
coreutils-8.29.64-1755f/src/copy.c:2469:54: warning: The left operand of '&' is 
a garbage value
#  dst_mode_bits = (x->set_mode ? x->mode : src_mode) & CHMOD_MODE_BITS;
#                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
coreutils-8.29.64-1755f/src/copy.c:1858:3: note: 'src_mode' declared without an 
initial value
#  mode_t src_mode IF_LINT ( = 0);
#  ^~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:7: note: Assuming the condition is false
#  if (x->move_mode)
#      ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: Assuming 'rename_errno' is not 
equal to 0
#  if (rename_errno == 0
#      ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: '?' condition is false
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Assuming 'rename_errno' is 
equal to EEXIST
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#        ^~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Left side of '||' is false
coreutils-8.29.64-1755f/src/copy.c:1886:35: note: Assuming the condition is 
false
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:3: note: Taking false branch
#  if (rename_errno == 0
#  ^
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Assuming 'command_line_arg' is 0
#  if (command_line_arg && x->src_info)
#      ^~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:24: note: Left side of '&&' is false
#  if (command_line_arg && x->src_info)
#                       ^
coreutils-8.29.64-1755f/src/copy.c:1927:7: note: Assuming 'new_dst' is not 
equal to 0
#  if (!new_dst)
#      ^~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1927:3: note: Taking false branch
#  if (!new_dst)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2190:7: note: Left side of '&&' is false
#      && x->dest_info
#      ^
coreutils-8.29.64-1755f/src/copy.c:2226:7: note: Assuming the condition is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#      ^~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2226:18: note: Left side of '&&' is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#                 ^
coreutils-8.29.64-1755f/src/copy.c:2259:3: note: Taking false branch
#  if (rename_errno == 0)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2261:12: note: Assuming the condition is 
false
#  else if (x->recursive && S_ISDIR (src_mode))
#           ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2261:25: note: Left side of '&&' is false
#  else if (x->recursive && S_ISDIR (src_mode))
#                        ^
coreutils-8.29.64-1755f/src/copy.c:2268:25: note: Left side of '&&' is false
#  else if (x->move_mode && src_sb.st_nlink == 1)
#                        ^
coreutils-8.29.64-1755f/src/copy.c:2272:12: note: Assuming the condition is 
false
#  else if (x->preserve_links
#           ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2273:12: note: Left side of '&&' is false
#           && !x->hard_link
#           ^
coreutils-8.29.64-1755f/src/copy.c:2285:3: note: Taking false branch
#  if (earlier_file)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2345:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2469:20: note: Assuming the condition is 
false
#  dst_mode_bits = (x->set_mode ? x->mode : src_mode) & CHMOD_MODE_BITS;
#                   ^~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2469:20: note: '?' condition is false
coreutils-8.29.64-1755f/src/copy.c:2469:54: note: The left operand of '&' is a 
garbage value
#  dst_mode_bits = (x->set_mode ? x->mode : src_mode) & CHMOD_MODE_BITS;
#                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
# 2467|        omit some permissions at first, so unauthorized users cannot nip
# 2468|        in before the file is ready.  */
# 2469|->   dst_mode_bits = (x->set_mode ? x->mode : src_mode) & 
CHMOD_MODE_BITS;
# 2470|     omitted_permissions =
# 2471|       (dst_mode_bits

Error: CLANG_WARNING:
coreutils-8.29.64-1755f/src/copy.c:2473:11: warning: The left operand of '&' is 
a garbage value
#        : S_ISDIR (src_mode) ? S_IWGRP | S_IWOTH
#          ^
/usr/include/sys/stat.h:125:24: note: expanded from macro 'S_ISDIR'
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^
/usr/include/sys/stat.h:123:41: note: expanded from macro '__S_ISTYPE'
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                         ^
coreutils-8.29.64-1755f/src/copy.c:1858:3: note: 'src_mode' declared without an 
initial value
#  mode_t src_mode IF_LINT ( = 0);
#  ^~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:7: note: Assuming the condition is false
#  if (x->move_mode)
#      ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: Assuming 'rename_errno' is not 
equal to 0
#  if (rename_errno == 0
#      ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: '?' condition is false
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Assuming 'rename_errno' is 
equal to EEXIST
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#        ^~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Left side of '||' is false
coreutils-8.29.64-1755f/src/copy.c:1886:35: note: Assuming the condition is 
false
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:3: note: Taking false branch
#  if (rename_errno == 0
#  ^
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Assuming 'command_line_arg' is 0
#  if (command_line_arg && x->src_info)
#      ^~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:24: note: Left side of '&&' is false
#  if (command_line_arg && x->src_info)
#                       ^
coreutils-8.29.64-1755f/src/copy.c:1927:7: note: Assuming 'new_dst' is not 
equal to 0
#  if (!new_dst)
#      ^~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1927:3: note: Taking false branch
#  if (!new_dst)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2190:7: note: Left side of '&&' is false
#      && x->dest_info
#      ^
coreutils-8.29.64-1755f/src/copy.c:2226:7: note: Assuming the condition is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#      ^~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2226:18: note: Left side of '&&' is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#                 ^
coreutils-8.29.64-1755f/src/copy.c:2259:3: note: Taking false branch
#  if (rename_errno == 0)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2261:12: note: Assuming the condition is 
false
#  else if (x->recursive && S_ISDIR (src_mode))
#           ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2261:25: note: Left side of '&&' is false
#  else if (x->recursive && S_ISDIR (src_mode))
#                        ^
coreutils-8.29.64-1755f/src/copy.c:2268:25: note: Left side of '&&' is false
#  else if (x->move_mode && src_sb.st_nlink == 1)
#                        ^
coreutils-8.29.64-1755f/src/copy.c:2272:12: note: Assuming the condition is 
false
#  else if (x->preserve_links
#           ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2273:12: note: Left side of '&&' is false
#           && !x->hard_link
#           ^
coreutils-8.29.64-1755f/src/copy.c:2285:3: note: Taking false branch
#  if (earlier_file)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2345:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2469:20: note: Assuming the condition is true
#  dst_mode_bits = (x->set_mode ? x->mode : src_mode) & CHMOD_MODE_BITS;
#                   ^~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2469:20: note: '?' condition is true
coreutils-8.29.64-1755f/src/copy.c:2472:9: note: Assuming the condition is false
#     & (x->preserve_ownership ? S_IRWXG | S_IRWXO
#        ^~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2472:9: note: '?' condition is false
coreutils-8.29.64-1755f/src/copy.c:2473:11: note: The left operand of '&' is a 
garbage value
#        : S_ISDIR (src_mode) ? S_IWGRP | S_IWOTH
#          ^        ~~~~~~~~
/usr/include/sys/stat.h:125:24: note: expanded from macro 'S_ISDIR'
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^           ~~~~
/usr/include/sys/stat.h:123:41: note: expanded from macro '__S_ISTYPE'
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                   ~~~~  ^
# 2471|       (dst_mode_bits
# 2472|        & (x->preserve_ownership ? S_IRWXG | S_IRWXO
# 2473|->         : S_ISDIR (src_mode) ? S_IWGRP | S_IWOTH
# 2474|           : 0));
# 2475|   

Error: COMPILER_WARNING:
coreutils-8.29.64-1755f/src/copy.c: scope_hint: In function 'copy_internal'
coreutils-8.29.64-1755f/src/copy.c:2482:9: warning: 'src_mode' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
#   if (! set_process_security_ctx (src_name, dst_name, src_mode, new_dst, x))
#         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 2480|        when copying the context with --preserve=context.
# 2481|        FIXME: Do we need to consider dst_mode_bits here?  */
# 2482|->   if (! set_process_security_ctx (src_name, dst_name, src_mode, 
new_dst, x))
# 2483|       return false;
# 2484|   

Error: CLANG_WARNING:
coreutils-8.29.64-1755f/src/copy.c:2482:9: warning: 3rd function call argument 
is an uninitialized value
#  if (! set_process_security_ctx (src_name, dst_name, src_mode, new_dst, x))
#        ^                                             ~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1858:3: note: 'src_mode' declared without an 
initial value
#  mode_t src_mode IF_LINT ( = 0);
#  ^~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:7: note: Assuming the condition is false
#  if (x->move_mode)
#      ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: Assuming 'rename_errno' is not 
equal to 0
#  if (rename_errno == 0
#      ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: '?' condition is false
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Assuming 'rename_errno' is 
equal to EEXIST
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#        ^~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Left side of '||' is false
coreutils-8.29.64-1755f/src/copy.c:1886:35: note: Assuming the condition is 
false
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:3: note: Taking false branch
#  if (rename_errno == 0
#  ^
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Assuming 'command_line_arg' is 0
#  if (command_line_arg && x->src_info)
#      ^~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:24: note: Left side of '&&' is false
#  if (command_line_arg && x->src_info)
#                       ^
coreutils-8.29.64-1755f/src/copy.c:1927:7: note: Assuming 'new_dst' is not 
equal to 0
#  if (!new_dst)
#      ^~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1927:3: note: Taking false branch
#  if (!new_dst)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2190:7: note: Left side of '&&' is false
#      && x->dest_info
#      ^
coreutils-8.29.64-1755f/src/copy.c:2226:7: note: Assuming the condition is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#      ^~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2226:18: note: Left side of '&&' is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#                 ^
coreutils-8.29.64-1755f/src/copy.c:2259:3: note: Taking false branch
#  if (rename_errno == 0)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2261:12: note: Assuming the condition is 
false
#  else if (x->recursive && S_ISDIR (src_mode))
#           ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2261:25: note: Left side of '&&' is false
#  else if (x->recursive && S_ISDIR (src_mode))
#                        ^
coreutils-8.29.64-1755f/src/copy.c:2268:25: note: Left side of '&&' is false
#  else if (x->move_mode && src_sb.st_nlink == 1)
#                        ^
coreutils-8.29.64-1755f/src/copy.c:2272:12: note: Assuming the condition is 
false
#  else if (x->preserve_links
#           ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2273:12: note: Left side of '&&' is false
#           && !x->hard_link
#           ^
coreutils-8.29.64-1755f/src/copy.c:2285:3: note: Taking false branch
#  if (earlier_file)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2345:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2469:20: note: Assuming the condition is true
#  dst_mode_bits = (x->set_mode ? x->mode : src_mode) & CHMOD_MODE_BITS;
#                   ^~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2469:20: note: '?' condition is true
coreutils-8.29.64-1755f/src/copy.c:2472:9: note: Assuming the condition is true
#     & (x->preserve_ownership ? S_IRWXG | S_IRWXO
#        ^~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2472:9: note: '?' condition is true
coreutils-8.29.64-1755f/src/copy.c:2482:9: note: 3rd function call argument is 
an uninitialized value
#  if (! set_process_security_ctx (src_name, dst_name, src_mode, new_dst, x))
#        ^                                             ~~~~~~~~
# 2480|        when copying the context with --preserve=context.
# 2481|        FIXME: Do we need to consider dst_mode_bits here?  */
# 2482|->   if (! set_process_security_ctx (src_name, dst_name, src_mode, 
new_dst, x))
# 2483|       return false;
# 2484|   
              coreutils-8.29-9999.2.fc29 - Defects not detected in
          /home/kdudka/fedora/coreutils/coreutils-8.29-12.fc29.src.rpm

List of Defects

Error: UNINIT (CWE-457): [1][#def1]
coreutils-8.29.64-1755f/src/copy.c:1856: var_decl: Declaring variable "src_sb" w
ithout initializer.
coreutils-8.29.64-1755f/src/copy.c:1873: cond_true: Condition "x->move_mode", ta
king true branch.
coreutils-8.29.64-1755f/src/copy.c:1875: cond_true: Condition "rename_errno < 0"
, taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1876: cond_false: Condition "renameat2(-100,
src_name, -100, dst_name, 1U /* 1 << 0 */)", taking false branch.
coreutils-8.29.64-1755f/src/copy.c:1879: cond_true: Condition "rename_errno == 0
", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1879: cond_true: Condition "rename_errno == 0
", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1880: cond_true: Condition "rename_succeeded"
, taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1884: cond_true: Condition "rename_errno == 0
", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1884: cond_false: Condition "!x->last_file",
taking false branch.
coreutils-8.29.64-1755f/src/copy.c:1884: cond_false: Condition "(rename_errno ==
 0) ? !x->last_file : (rename_errno != 17 || x->interactive != I_ALWAYS_NO)", ta
king false branch.
coreutils-8.29.64-1755f/src/copy.c:1905: if_end: End of if statement.
coreutils-8.29.64-1755f/src/copy.c:1911: cond_true: Condition "command_line_arg"
, taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1911: cond_true: Condition "x->src_info", tak
ing true branch.
coreutils-8.29.64-1755f/src/copy.c:1913: uninit_use: Using uninitialized value "
src_sb.st_mode".
# 1911|     if (command_line_arg && x->src_info)
# 1912|       {
# 1913|->       if ( ! S_ISDIR (src_sb.st_mode)
# 1914|              && x->backup_type == no_backups
# 1915|              && seen_file (x->src_info, src_name, &src_sb))

Error: UNINIT (CWE-457): [2][#def2]
coreutils-8.29.64-1755f/src/copy.c:1856: var_decl: Declaring variable "src_sb" w
ithout initializer.
coreutils-8.29.64-1755f/src/copy.c:1873: cond_true: Condition "x->move_mode", ta
king true branch.
coreutils-8.29.64-1755f/src/copy.c:1875: cond_true: Condition "rename_errno < 0"
, taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1876: cond_false: Condition "renameat2(-100,
src_name, -100, dst_name, 1U /* 1 << 0 */)", taking false branch.
coreutils-8.29.64-1755f/src/copy.c:1879: cond_true: Condition "rename_errno == 0
", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1879: cond_true: Condition "rename_errno == 0
", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1880: cond_true: Condition "rename_succeeded"
, taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1884: cond_true: Condition "rename_errno == 0
", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1884: cond_false: Condition "!x->last_file",
taking false branch.
coreutils-8.29.64-1755f/src/copy.c:1884: cond_false: Condition "(rename_errno ==
 0) ? !x->last_file : (rename_errno != 17 || x->interactive != I_ALWAYS_NO)", ta
king false branch.
coreutils-8.29.64-1755f/src/copy.c:1905: if_end: End of if statement.
coreutils-8.29.64-1755f/src/copy.c:1911: cond_true: Condition "command_line_arg"
, taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1911: cond_true: Condition "x->src_info", tak
ing true branch.
coreutils-8.29.64-1755f/src/copy.c:1913: cond_true: Condition "!((src_sb.st_mode
 & 61440) == 16384)", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1913: cond_true: Condition "x->backup_type ==
 no_backups", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1913: uninit_use_in_call: Using uninitialized
 value "src_sb.st_dev" when calling "seen_file".
coreutils-8.29.64-1755f/lib/file-set.c:66:3: cond_false: Condition "ht == NULL",
 taking false branch.
coreutils-8.29.64-1755f/lib/file-set.c:67:5: if_end: End of if statement.
coreutils-8.29.64-1755f/lib/file-set.c:71:3: read_parm_fld: Reading a parameter
field.
coreutils-8.29.64-1755f/src/copy.c:1913: uninit_use_in_call: Using uninitialized
 value "src_sb.st_ino" when calling "seen_file".
coreutils-8.29.64-1755f/lib/file-set.c:66:3: cond_false: Condition "ht == NULL",
 taking false branch.
coreutils-8.29.64-1755f/lib/file-set.c:67:5: if_end: End of if statement.
coreutils-8.29.64-1755f/lib/file-set.c:70:3: read_parm_fld: Reading a parameter
field.
# 1911|     if (command_line_arg && x->src_info)
# 1912|       {
# 1913|->       if ( ! S_ISDIR (src_sb.st_mode)
# 1914|              && x->backup_type == no_backups
# 1915|              && seen_file (x->src_info, src_name, &src_sb))

Error: CLANG_WARNING: [3][#def3]
coreutils-8.29.64-1755f/src/copy.c:1913:14: warning: The left operand of `&` is
a garbage value
#      if ( ! S_ISDIR (src_sb.st_mode)
#             ^
/usr/include/sys/stat.h:125:24: note: expanded from macro `S_ISDIR`
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^
/usr/include/sys/stat.h:123:41: note: expanded from macro `__S_ISTYPE`
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                         ^
coreutils-8.29.64-1755f/src/copy.c:1873:7: note: Assuming the condition is false
#  if (x->move_mode)
#      ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: Assuming `rename_errno` is not
equal to 0
#  if (rename_errno == 0
#      ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: `?` condition is false
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Assuming `rename_errno` is equa
l to EEXIST
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#        ^~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Left side of `||` is false
coreutils-8.29.64-1755f/src/copy.c:1886:35: note: Assuming the condition is fals
e
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:3: note: Taking false branch
#  if (rename_errno == 0
#  ^
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Assuming `command_line_arg` is
not equal to 0
#  if (command_line_arg && x->src_info)
#      ^~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Left side of `&&` is true
coreutils-8.29.64-1755f/src/copy.c:1911:27: note: Assuming the condition is true
#  if (command_line_arg && x->src_info)
#                          ^~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:3: note: Taking true branch
#  if (command_line_arg && x->src_info)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1913:14: note: The left operand of `&` is a g
arbage value
#      if ( ! S_ISDIR (src_sb.st_mode)
#             ^        ~~~~~~~~~~~~~~
/usr/include/sys/stat.h:125:24: note: expanded from macro `S_ISDIR`
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^           ~~~~
/usr/include/sys/stat.h:123:41: note: expanded from macro `__S_ISTYPE`
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                   ~~~~  ^
# 1911|     if (command_line_arg && x->src_info)
# 1912|       {
# 1913|->       if ( ! S_ISDIR (src_sb.st_mode)
# 1914|              && x->backup_type == no_backups
# 1915|              && seen_file (x->src_info, src_name, &src_sb))

Error: UNINIT (CWE-457): [4][#def4]
coreutils-8.29.64-1755f/src/copy.c:1856: var_decl: Declaring variable "src_sb" w
ithout initializer.
coreutils-8.29.64-1755f/src/copy.c:1873: cond_true: Condition "x->move_mode", ta
king true branch.
coreutils-8.29.64-1755f/src/copy.c:1875: cond_true: Condition "rename_errno < 0"
, taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1876: cond_false: Condition "renameat2(-100,
src_name, -100, dst_name, 1U /* 1 << 0 */)", taking false branch.
coreutils-8.29.64-1755f/src/copy.c:1879: cond_true: Condition "rename_errno == 0
", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1879: cond_true: Condition "rename_errno == 0
", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1880: cond_true: Condition "rename_succeeded"
, taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1884: cond_true: Condition "rename_errno == 0
", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1884: cond_false: Condition "!x->last_file",
taking false branch.
coreutils-8.29.64-1755f/src/copy.c:1884: cond_false: Condition "(rename_errno ==
 0) ? !x->last_file : (rename_errno != 17 || x->interactive != I_ALWAYS_NO)", ta
king false branch.
coreutils-8.29.64-1755f/src/copy.c:1905: if_end: End of if statement.
coreutils-8.29.64-1755f/src/copy.c:1911: cond_true: Condition "command_line_arg"
, taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1911: cond_true: Condition "x->src_info", tak
ing true branch.
coreutils-8.29.64-1755f/src/copy.c:1913: cond_true: Condition "!((src_sb.st_mode
 & 61440) == 16384)", taking true branch.
coreutils-8.29.64-1755f/src/copy.c:1913: cond_false: Condition "x->backup_type =
= no_backups", taking false branch.
coreutils-8.29.64-1755f/src/copy.c:1920: if_end: End of if statement.
coreutils-8.29.64-1755f/src/copy.c:1922: uninit_use_in_call: Using uninitialized
 value "src_sb.st_dev" when calling "record_file".
coreutils-8.29.64-1755f/lib/file-set.c:33:3: cond_false: Condition "ht == NULL",
 taking false branch.
coreutils-8.29.64-1755f/lib/file-set.c:34:5: if_end: End of if statement.
coreutils-8.29.64-1755f/lib/file-set.c:39:3: read_parm_fld: Reading a parameter
field.
coreutils-8.29.64-1755f/src/copy.c:1922: uninit_use_in_call: Using uninitialized
 value "src_sb.st_ino" when calling "record_file".
coreutils-8.29.64-1755f/lib/file-set.c:33:3: cond_false: Condition "ht == NULL",
 taking false branch.
coreutils-8.29.64-1755f/lib/file-set.c:34:5: if_end: End of if statement.
coreutils-8.29.64-1755f/lib/file-set.c:38:3: read_parm_fld: Reading a parameter
field.
# 1920|           }
# 1921|
# 1922|->       record_file (x->src_info, src_name, &src_sb);
# 1923|       }
# 1924|

Error: CLANG_WARNING: [5][#def5]
coreutils-8.29.64-1755f/src/copy.c:1977:29: warning: The left operand of `&` is
a garbage value
#          if (x->update && !S_ISDIR (src_mode))
#                            ^
/usr/include/sys/stat.h:125:24: note: expanded from macro `S_ISDIR`
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^
/usr/include/sys/stat.h:123:41: note: expanded from macro `__S_ISTYPE`
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                         ^
coreutils-8.29.64-1755f/src/copy.c:1858:3: note: `src_mode` declared without an
initial value
#  mode_t src_mode IF_LINT ( = 0);
#  ^~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:7: note: Assuming the condition is false
#  if (x->move_mode)
#      ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: Assuming `rename_errno` is not
equal to 0
#  if (rename_errno == 0
#      ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: `?` condition is false
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Assuming `rename_errno` is equa
l to EEXIST
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#        ^~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Left side of `||` is false
coreutils-8.29.64-1755f/src/copy.c:1886:35: note: Assuming the condition is fals
e
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:3: note: Taking false branch
#  if (rename_errno == 0
#  ^
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Assuming `command_line_arg` is
0
#  if (command_line_arg && x->src_info)
#      ^~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:24: note: Left side of `&&` is false
#  if (command_line_arg && x->src_info)
#                       ^
coreutils-8.29.64-1755f/src/copy.c:1927:7: note: Assuming `new_dst` is 0
#  if (!new_dst)
#      ^~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1927:3: note: Taking true branch
#  if (!new_dst)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1929:14: note: Left side of `&&` is true
#      if (! (rename_errno == EEXIST && x->interactive == I_ALWAYS_NO))
#             ^
coreutils-8.29.64-1755f/src/copy.c:1929:7: note: Taking false branch
#      if (! (rename_errno == EEXIST && x->interactive == I_ALWAYS_NO))
#      ^
coreutils-8.29.64-1755f/src/copy.c:1964:7: note: Taking true branch
#      if (rename_errno == EEXIST)
#      ^
coreutils-8.29.64-1755f/src/copy.c:1969:15: note: Left side of `&&` is false
#              && ! same_file_ok (src_name, &src_sb, dst_name, &dst_sb,
#              ^
coreutils-8.29.64-1755f/src/copy.c:1977:15: note: Assuming the condition is true
#          if (x->update && !S_ISDIR (src_mode))
#              ^~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1977:15: note: Left side of `&&` is true
coreutils-8.29.64-1755f/src/copy.c:1977:29: note: The left operand of `&` is a g
arbage value
#          if (x->update && !S_ISDIR (src_mode))
#                            ^        ~~~~~~~~
/usr/include/sys/stat.h:125:24: note: expanded from macro `S_ISDIR`
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^           ~~~~
/usr/include/sys/stat.h:123:41: note: expanded from macro `__S_ISTYPE`
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                   ~~~~  ^
# 1975|               }
# 1976|
# 1977|->           if (x->update && !S_ISDIR (src_mode))
# 1978|               {
# 1979|                 /* When preserving timestamps (but not moving within a f
ile

Error: CLANG_WARNING: [6][#def6]
coreutils-8.29.64-1755f/src/copy.c:2040:21: warning: The left operand of `&` is
a garbage value
#              if (! S_ISDIR (src_mode)
#                    ^
/usr/include/sys/stat.h:125:24: note: expanded from macro `S_ISDIR`
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^
/usr/include/sys/stat.h:123:41: note: expanded from macro `__S_ISTYPE`
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                         ^
coreutils-8.29.64-1755f/src/copy.c:1858:3: note: `src_mode` declared without an
initial value
#  mode_t src_mode IF_LINT ( = 0);
#  ^~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:7: note: Assuming the condition is false
#  if (x->move_mode)
#      ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: Assuming `rename_errno` is not
equal to 0
#  if (rename_errno == 0
#      ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: `?` condition is false
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Assuming `rename_errno` is equa
l to EEXIST
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#        ^~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Left side of `||` is false
coreutils-8.29.64-1755f/src/copy.c:1886:35: note: Assuming the condition is fals
e
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:3: note: Taking false branch
#  if (rename_errno == 0
#  ^
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Assuming `command_line_arg` is
0
#  if (command_line_arg && x->src_info)
#      ^~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:24: note: Left side of `&&` is false
#  if (command_line_arg && x->src_info)
#                       ^
coreutils-8.29.64-1755f/src/copy.c:1927:7: note: Assuming `new_dst` is 0
#  if (!new_dst)
#      ^~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1927:3: note: Taking true branch
#  if (!new_dst)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1929:14: note: Left side of `&&` is true
#      if (! (rename_errno == EEXIST && x->interactive == I_ALWAYS_NO))
#             ^
coreutils-8.29.64-1755f/src/copy.c:1929:7: note: Taking false branch
#      if (! (rename_errno == EEXIST && x->interactive == I_ALWAYS_NO))
#      ^
coreutils-8.29.64-1755f/src/copy.c:1964:7: note: Taking true branch
#      if (rename_errno == EEXIST)
#      ^
coreutils-8.29.64-1755f/src/copy.c:1969:15: note: Left side of `&&` is false
#              && ! same_file_ok (src_name, &src_sb, dst_name, &dst_sb,
#              ^
coreutils-8.29.64-1755f/src/copy.c:1977:15: note: Assuming the condition is fals
e
#          if (x->update && !S_ISDIR (src_mode))
#              ^~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1977:25: note: Left side of `&&` is false
#          if (x->update && !S_ISDIR (src_mode))
#                        ^
coreutils-8.29.64-1755f/src/copy.c:2027:11: note: Taking false branch
#          if (x->move_mode)
#          ^
coreutils-8.29.64-1755f/src/copy.c:2040:21: note: The left operand of `&` is a g
arbage value
#              if (! S_ISDIR (src_mode)
#                    ^        ~~~~~~~~
/usr/include/sys/stat.h:125:24: note: expanded from macro `S_ISDIR`
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^           ~~~~
/usr/include/sys/stat.h:123:41: note: expanded from macro `__S_ISTYPE`
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                   ~~~~  ^
# 2038|             else
# 2039|               {
# 2040|->               if (! S_ISDIR (src_mode)
# 2041|                     && (x->interactive == I_ALWAYS_NO
# 2042|                         || (x->interactive == I_ASK_USER

Error: CLANG_WARNING: [7][#def7]
coreutils-8.29.64-1755f/src/copy.c:2226:39: warning: The left operand of `&` is
a garbage value
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#                                      ^
/usr/include/sys/stat.h:125:24: note: expanded from macro `S_ISDIR`
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^
/usr/include/sys/stat.h:123:41: note: expanded from macro `__S_ISTYPE`
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                         ^
coreutils-8.29.64-1755f/src/copy.c:1858:3: note: `src_mode` declared without an
initial value
#  mode_t src_mode IF_LINT ( = 0);
#  ^~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:7: note: Assuming the condition is false
#  if (x->move_mode)
#      ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: Assuming `rename_errno` is not
equal to 0
#  if (rename_errno == 0
#      ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: `?` condition is false
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Assuming `rename_errno` is equa
l to EEXIST
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#        ^~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Left side of `||` is false
coreutils-8.29.64-1755f/src/copy.c:1886:35: note: Assuming the condition is fals
e
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:3: note: Taking false branch
#  if (rename_errno == 0
#  ^
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Assuming `command_line_arg` is
0
#  if (command_line_arg && x->src_info)
#      ^~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:24: note: Left side of `&&` is false
#  if (command_line_arg && x->src_info)
#                       ^
coreutils-8.29.64-1755f/src/copy.c:1927:7: note: Assuming `new_dst` is not equal
 to 0
#  if (!new_dst)
#      ^~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1927:3: note: Taking false branch
#  if (!new_dst)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2190:7: note: Left side of `&&` is false
#      && x->dest_info
#      ^
coreutils-8.29.64-1755f/src/copy.c:2226:7: note: Assuming the condition is true
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#      ^~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2226:7: note: Left side of `&&` is true
coreutils-8.29.64-1755f/src/copy.c:2226:7: note: Left side of `&&` is true
coreutils-8.29.64-1755f/src/copy.c:2226:39: note: The left operand of `&` is a g
arbage value
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#                                      ^        ~~~~~~~~
/usr/include/sys/stat.h:125:24: note: expanded from macro `S_ISDIR`
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^           ~~~~
/usr/include/sys/stat.h:123:41: note: expanded from macro `__S_ISTYPE`
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                   ~~~~  ^
# 2224|        sure we`ll create a directory.  Also don`t announce yet when movi
ng
# 2225|        so we can distinguish renames versus copies.  */
# 2226|->   if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
# 2227|       emit_verbose (src_name, dst_name, dst_backup);
# 2228|

Error: CLANG_WARNING: [8][#def8]
coreutils-8.29.64-1755f/src/copy.c:2261:28: warning: The left operand of `&` is
a garbage value
#  else if (x->recursive && S_ISDIR (src_mode))
#                           ^
/usr/include/sys/stat.h:125:24: note: expanded from macro `S_ISDIR`
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^
/usr/include/sys/stat.h:123:41: note: expanded from macro `__S_ISTYPE`
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                         ^
coreutils-8.29.64-1755f/src/copy.c:1858:3: note: `src_mode` declared without an
initial value
#  mode_t src_mode IF_LINT ( = 0);
#  ^~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:7: note: Assuming the condition is false
#  if (x->move_mode)
#      ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: Assuming `rename_errno` is not
equal to 0
#  if (rename_errno == 0
#      ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: `?` condition is false
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Assuming `rename_errno` is equa
l to EEXIST
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#        ^~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Left side of `||` is false
coreutils-8.29.64-1755f/src/copy.c:1886:35: note: Assuming the condition is fals
e
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:3: note: Taking false branch
#  if (rename_errno == 0
#  ^
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Assuming `command_line_arg` is
0
#  if (command_line_arg && x->src_info)
#      ^~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:24: note: Left side of `&&` is false
#  if (command_line_arg && x->src_info)
#                       ^
coreutils-8.29.64-1755f/src/copy.c:1927:7: note: Assuming `new_dst` is not equal
 to 0
#  if (!new_dst)
#      ^~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1927:3: note: Taking false branch
#  if (!new_dst)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2190:7: note: Left side of `&&` is false
#      && x->dest_info
#      ^
coreutils-8.29.64-1755f/src/copy.c:2226:7: note: Assuming the condition is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#      ^~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2226:18: note: Left side of `&&` is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#                 ^
coreutils-8.29.64-1755f/src/copy.c:2259:3: note: Taking false branch
#  if (rename_errno == 0)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2261:12: note: Assuming the condition is true
#  else if (x->recursive && S_ISDIR (src_mode))
#           ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2261:12: note: Left side of `&&` is true
coreutils-8.29.64-1755f/src/copy.c:2261:28: note: The left operand of `&` is a g
arbage value
#  else if (x->recursive && S_ISDIR (src_mode))
#                           ^        ~~~~~~~~
/usr/include/sys/stat.h:125:24: note: expanded from macro `S_ISDIR`
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^           ~~~~
/usr/include/sys/stat.h:123:41: note: expanded from macro `__S_ISTYPE`
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                   ~~~~  ^
# 2259|     if (rename_errno == 0)
# 2260|       earlier_file = NULL;
# 2261|->   else if (x->recursive && S_ISDIR (src_mode))
# 2262|       {
# 2263|         if (command_line_arg)

Error: CLANG_WARNING: [9][#def9]
coreutils-8.29.64-1755f/src/copy.c:2274:18: warning: The right operand of `<` is
 a garbage value
#           && (1 < src_sb.st_nlink
#                 ^ ~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:7: note: Assuming the condition is false
#  if (x->move_mode)
#      ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: Assuming `rename_errno` is not
equal to 0
#  if (rename_errno == 0
#      ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: `?` condition is false
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Assuming `rename_errno` is equa
l to EEXIST
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#        ^~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Left side of `||` is false
coreutils-8.29.64-1755f/src/copy.c:1886:35: note: Assuming the condition is fals
e
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:3: note: Taking false branch
#  if (rename_errno == 0
#  ^
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Assuming `command_line_arg` is
0
#  if (command_line_arg && x->src_info)
#      ^~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:24: note: Left side of `&&` is false
#  if (command_line_arg && x->src_info)
#                       ^
coreutils-8.29.64-1755f/src/copy.c:1927:7: note: Assuming `new_dst` is not equal
 to 0
#  if (!new_dst)
#      ^~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1927:3: note: Taking false branch
#  if (!new_dst)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2190:7: note: Left side of `&&` is false
#      && x->dest_info
#      ^
coreutils-8.29.64-1755f/src/copy.c:2226:7: note: Assuming the condition is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#      ^~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2226:18: note: Left side of `&&` is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#                 ^
coreutils-8.29.64-1755f/src/copy.c:2259:3: note: Taking false branch
#  if (rename_errno == 0)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2261:12: note: Assuming the condition is fals
e
#  else if (x->recursive && S_ISDIR (src_mode))
#           ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2261:25: note: Left side of `&&` is false
#  else if (x->recursive && S_ISDIR (src_mode))
#                        ^
coreutils-8.29.64-1755f/src/copy.c:2268:25: note: Left side of `&&` is false
#  else if (x->move_mode && src_sb.st_nlink == 1)
#                        ^
coreutils-8.29.64-1755f/src/copy.c:2272:12: note: Assuming the condition is true
#  else if (x->preserve_links
#           ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2272:12: note: Left side of `&&` is true
coreutils-8.29.64-1755f/src/copy.c:2273:15: note: Assuming the condition is true
#           && !x->hard_link
#              ^~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2272:12: note: Left side of `&&` is true
#  else if (x->preserve_links
#           ^
coreutils-8.29.64-1755f/src/copy.c:2274:18: note: The right operand of `<` is a
garbage value
#           && (1 < src_sb.st_nlink
#                 ^ ~~~~~~~~~~~~~~~
# 2272|     else if (x->preserve_links
# 2273|              && !x->hard_link
# 2274|->            && (1 < src_sb.st_nlink
# 2275|                  || (command_line_arg
# 2276|                      && x->dereference == DEREF_COMMAND_LINE_ARGUMENTS)

Error: CLANG_WARNING: [10][#def10]
coreutils-8.29.64-1755f/src/copy.c:2469:54: warning: The left operand of `&` is
a garbage value
#  dst_mode_bits = (x->set_mode ? x->mode : src_mode) & CHMOD_MODE_BITS;
#                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
coreutils-8.29.64-1755f/src/copy.c:1858:3: note: `src_mode` declared without an
initial value
#  mode_t src_mode IF_LINT ( = 0);
#  ^~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:7: note: Assuming the condition is false
#  if (x->move_mode)
#      ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: Assuming `rename_errno` is not
equal to 0
#  if (rename_errno == 0
#      ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: `?` condition is false
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Assuming `rename_errno` is equa
l to EEXIST
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#        ^~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Left side of `||` is false
coreutils-8.29.64-1755f/src/copy.c:1886:35: note: Assuming the condition is fals
e
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:3: note: Taking false branch
#  if (rename_errno == 0
#  ^
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Assuming `command_line_arg` is
0
#  if (command_line_arg && x->src_info)
#      ^~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:24: note: Left side of `&&` is false
#  if (command_line_arg && x->src_info)
#                       ^
coreutils-8.29.64-1755f/src/copy.c:1927:7: note: Assuming `new_dst` is not equal
 to 0
#  if (!new_dst)
#      ^~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1927:3: note: Taking false branch
#  if (!new_dst)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2190:7: note: Left side of `&&` is false
#      && x->dest_info
#      ^
coreutils-8.29.64-1755f/src/copy.c:2226:7: note: Assuming the condition is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#      ^~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2226:18: note: Left side of `&&` is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#                 ^
coreutils-8.29.64-1755f/src/copy.c:2259:3: note: Taking false branch
#  if (rename_errno == 0)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2261:12: note: Assuming the condition is fals
e
#  else if (x->recursive && S_ISDIR (src_mode))
#           ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2261:25: note: Left side of `&&` is false
#  else if (x->recursive && S_ISDIR (src_mode))
#                        ^
coreutils-8.29.64-1755f/src/copy.c:2268:25: note: Left side of `&&` is false
#  else if (x->move_mode && src_sb.st_nlink == 1)
#                        ^
coreutils-8.29.64-1755f/src/copy.c:2272:12: note: Assuming the condition is fals
e
#  else if (x->preserve_links
#           ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2273:12: note: Left side of `&&` is false
#           && !x->hard_link
#           ^
coreutils-8.29.64-1755f/src/copy.c:2285:3: note: Taking false branch
#  if (earlier_file)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2345:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2469:20: note: Assuming the condition is fals
e
#  dst_mode_bits = (x->set_mode ? x->mode : src_mode) & CHMOD_MODE_BITS;
#                   ^~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2469:20: note: `?` condition is false
coreutils-8.29.64-1755f/src/copy.c:2469:54: note: The left operand of `&` is a g
arbage value
#  dst_mode_bits = (x->set_mode ? x->mode : src_mode) & CHMOD_MODE_BITS;
#                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
# 2467|        omit some permissions at first, so unauthorized users cannot nip
# 2468|        in before the file is ready.  */
# 2469|->   dst_mode_bits = (x->set_mode ? x->mode : src_mode) & CHMOD_MODE_BITS
;
# 2470|     omitted_permissions =
# 2471|       (dst_mode_bits

Error: CLANG_WARNING: [11][#def11]
coreutils-8.29.64-1755f/src/copy.c:2473:11: warning: The left operand of `&` is
a garbage value
#        : S_ISDIR (src_mode) ? S_IWGRP | S_IWOTH
#          ^
/usr/include/sys/stat.h:125:24: note: expanded from macro `S_ISDIR`
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^
/usr/include/sys/stat.h:123:41: note: expanded from macro `__S_ISTYPE`
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                         ^
coreutils-8.29.64-1755f/src/copy.c:1858:3: note: `src_mode` declared without an
initial value
#  mode_t src_mode IF_LINT ( = 0);
#  ^~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:7: note: Assuming the condition is false
#  if (x->move_mode)
#      ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: Assuming `rename_errno` is not
equal to 0
#  if (rename_errno == 0
#      ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: `?` condition is false
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Assuming `rename_errno` is equa
l to EEXIST
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#        ^~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Left side of `||` is false
coreutils-8.29.64-1755f/src/copy.c:1886:35: note: Assuming the condition is fals
e
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:3: note: Taking false branch
#  if (rename_errno == 0
#  ^
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Assuming `command_line_arg` is
0
#  if (command_line_arg && x->src_info)
#      ^~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:24: note: Left side of `&&` is false
#  if (command_line_arg && x->src_info)
#                       ^
coreutils-8.29.64-1755f/src/copy.c:1927:7: note: Assuming `new_dst` is not equal
 to 0
#  if (!new_dst)
#      ^~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1927:3: note: Taking false branch
#  if (!new_dst)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2190:7: note: Left side of `&&` is false
#      && x->dest_info
#      ^
coreutils-8.29.64-1755f/src/copy.c:2226:7: note: Assuming the condition is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#      ^~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2226:18: note: Left side of `&&` is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#                 ^
coreutils-8.29.64-1755f/src/copy.c:2259:3: note: Taking false branch
#  if (rename_errno == 0)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2261:12: note: Assuming the condition is fals
e
#  else if (x->recursive && S_ISDIR (src_mode))
#           ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2261:25: note: Left side of `&&` is false
#  else if (x->recursive && S_ISDIR (src_mode))
#                        ^
coreutils-8.29.64-1755f/src/copy.c:2268:25: note: Left side of `&&` is false
#  else if (x->move_mode && src_sb.st_nlink == 1)
#                        ^
coreutils-8.29.64-1755f/src/copy.c:2272:12: note: Assuming the condition is fals
e
#  else if (x->preserve_links
#           ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2273:12: note: Left side of `&&` is false
#           && !x->hard_link
#           ^
coreutils-8.29.64-1755f/src/copy.c:2285:3: note: Taking false branch
#  if (earlier_file)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2345:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2469:20: note: Assuming the condition is true
#  dst_mode_bits = (x->set_mode ? x->mode : src_mode) & CHMOD_MODE_BITS;
#                   ^~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2469:20: note: `?` condition is true
coreutils-8.29.64-1755f/src/copy.c:2472:9: note: Assuming the condition is false
#     & (x->preserve_ownership ? S_IRWXG | S_IRWXO
#        ^~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2472:9: note: `?` condition is false
coreutils-8.29.64-1755f/src/copy.c:2473:11: note: The left operand of `&` is a g
arbage value
#        : S_ISDIR (src_mode) ? S_IWGRP | S_IWOTH
#          ^        ~~~~~~~~
/usr/include/sys/stat.h:125:24: note: expanded from macro `S_ISDIR`
##define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#                         ^           ~~~~
/usr/include/sys/stat.h:123:41: note: expanded from macro `__S_ISTYPE`
##define __S_ISTYPE(mode, mask)  (((mode) & __S_IFMT) == (mask))
#                                   ~~~~  ^
# 2471|       (dst_mode_bits
# 2472|        & (x->preserve_ownership ? S_IRWXG | S_IRWXO
# 2473|->         : S_ISDIR (src_mode) ? S_IWGRP | S_IWOTH
# 2474|           : 0));
# 2475|

Error: COMPILER_WARNING: [12][#def12]
coreutils-8.29.64-1755f/src/copy.c: scope_hint: In function `copy_internal`
coreutils-8.29.64-1755f/src/copy.c:2482:9: warning: `src_mode` may be used unini
tialized in this function [-Wmaybe-uninitialized]
#   if (! set_process_security_ctx (src_name, dst_name, src_mode, new_dst, x))
#         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 2480|        when copying the context with --preserve=context.
# 2481|        FIXME: Do we need to consider dst_mode_bits here?  */
# 2482|->   if (! set_process_security_ctx (src_name, dst_name, src_mode, new_ds
t, x))
# 2483|       return false;
# 2484|

Error: CLANG_WARNING: [13][#def13]
coreutils-8.29.64-1755f/src/copy.c:2482:9: warning: 3rd function call argument i
s an uninitialized value
#  if (! set_process_security_ctx (src_name, dst_name, src_mode, new_dst, x))
#        ^                                             ~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1858:3: note: `src_mode` declared without an
initial value
#  mode_t src_mode IF_LINT ( = 0);
#  ^~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:7: note: Assuming the condition is false
#  if (x->move_mode)
#      ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1873:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: Assuming `rename_errno` is not
equal to 0
#  if (rename_errno == 0
#      ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:7: note: `?` condition is false
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Assuming `rename_errno` is equa
l to EEXIST
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#        ^~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1886:9: note: Left side of `||` is false
coreutils-8.29.64-1755f/src/copy.c:1886:35: note: Assuming the condition is fals
e
#      : rename_errno != EEXIST || x->interactive != I_ALWAYS_NO)
#                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1884:3: note: Taking false branch
#  if (rename_errno == 0
#  ^
coreutils-8.29.64-1755f/src/copy.c:1911:7: note: Assuming `command_line_arg` is
0
#  if (command_line_arg && x->src_info)
#      ^~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1911:24: note: Left side of `&&` is false
#  if (command_line_arg && x->src_info)
#                       ^
coreutils-8.29.64-1755f/src/copy.c:1927:7: note: Assuming `new_dst` is not equal
 to 0
#  if (!new_dst)
#      ^~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:1927:3: note: Taking false branch
#  if (!new_dst)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2190:7: note: Left side of `&&` is false
#      && x->dest_info
#      ^
coreutils-8.29.64-1755f/src/copy.c:2226:7: note: Assuming the condition is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#      ^~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2226:18: note: Left side of `&&` is false
#  if (x->verbose && !x->move_mode && !S_ISDIR (src_mode))
#                 ^
coreutils-8.29.64-1755f/src/copy.c:2259:3: note: Taking false branch
#  if (rename_errno == 0)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2261:12: note: Assuming the condition is fals
e
#  else if (x->recursive && S_ISDIR (src_mode))
#           ^~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2261:25: note: Left side of `&&` is false
#  else if (x->recursive && S_ISDIR (src_mode))
#                        ^
coreutils-8.29.64-1755f/src/copy.c:2268:25: note: Left side of `&&` is false
#  else if (x->move_mode && src_sb.st_nlink == 1)
#                        ^
coreutils-8.29.64-1755f/src/copy.c:2272:12: note: Assuming the condition is fals
e
#  else if (x->preserve_links
#           ^~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2273:12: note: Left side of `&&` is false
#           && !x->hard_link
#           ^
coreutils-8.29.64-1755f/src/copy.c:2285:3: note: Taking false branch
#  if (earlier_file)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2345:3: note: Taking false branch
#  if (x->move_mode)
#  ^
coreutils-8.29.64-1755f/src/copy.c:2469:20: note: Assuming the condition is true
#  dst_mode_bits = (x->set_mode ? x->mode : src_mode) & CHMOD_MODE_BITS;
#                   ^~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2469:20: note: `?` condition is true
coreutils-8.29.64-1755f/src/copy.c:2472:9: note: Assuming the condition is true
#     & (x->preserve_ownership ? S_IRWXG | S_IRWXO
#        ^~~~~~~~~~~~~~~~~~~~~
coreutils-8.29.64-1755f/src/copy.c:2472:9: note: `?` condition is true
coreutils-8.29.64-1755f/src/copy.c:2482:9: note: 3rd function call argument is a
n uninitialized value
#  if (! set_process_security_ctx (src_name, dst_name, src_mode, new_dst, x))
#        ^                                             ~~~~~~~~
# 2480|        when copying the context with --preserve=context.
# 2481|        FIXME: Do we need to consider dst_mode_bits here?  */
# 2482|->   if (! set_process_security_ctx (src_name, dst_name, src_mode, new_ds
t, x))
# 2483|       return false;
# 2484|


Scan Properties

   analyzer-version-clang 6.0.0
   analyzer-version-coverity 2018.06
   analyzer-version-cppcheck 1.83
   analyzer-version-gcc 8.1.1
   analyzer-version-pylint 1.7.5
   analyzer-version-shellcheck 0.4.7
   cov-compilation-unit-count 547
   cov-compilation-unit-ratio 99
   cov-lines-processed 171017
   cov-time-elapsed-analysis 00:01:02
   diffbase-analyzer-version-clang 6.0.0
   diffbase-analyzer-version-coverity 2018.06
   diffbase-analyzer-version-cppcheck 1.83
   diffbase-analyzer-version-gcc 8.1.1
   diffbase-analyzer-version-pylint 1.7.5
   diffbase-analyzer-version-shellcheck 0.4.7
   diffbase-cov-compilation-unit-count 532
   diffbase-cov-compilation-unit-ratio 98
   diffbase-cov-lines-processed 166388
   diffbase-cov-time-elapsed-analysis 00:01:06
   diffbase-exit-code 0
   diffbase-host f27
   diffbase-mock-config rhel-8.0-x86_64
   diffbase-store-results-to
   /tmp/csmock_r42oj0_/coreutils-8.29-9999.2.fc29/run0
   diffbase-time-created 2018-06-27 12:44:17
   diffbase-time-finished 2018-06-27 12:59:40
   diffbase-tool csmock
   diffbase-tool-args '/usr/bin/csmock' '-afr' 'rhel-8.0-x86_64'
   '/home/kdudka/fedora/coreutils/coreutils-8.29-9999.2.fc29.src.rpm'
   '--base-srpm'
   '/home/kdudka/fedora/coreutils/coreutils-8.29-12.fc29.src.rpm'
   diffbase-tool-version csmock-2.1.1.20180626.174209.g3ea3888-1.fc27
   exit-code 0
   host f27
   mock-config rhel-8.0-x86_64
   store-results-to
   /home/kdudka/fedora/coreutils/coreutils-8.29-9999.2.fc29.tar.xz
   time-created 2018-06-27 12:44:17
   time-finished 2018-06-27 13:15:32
   title coreutils-8.29-9999.2.fc29 - Defects not detected in
   /home/kdudka/fedora/coreutils/coreutils-8.29-12.fc29.src.rpm
   tool csmock
   tool-args '/usr/bin/csmock' '-afr' 'rhel-8.0-x86_64'
   '/home/kdudka/fedora/coreutils/coreutils-8.29-9999.2.fc29.src.rpm'
   '--base-srpm'
   '/home/kdudka/fedora/coreutils/coreutils-8.29-12.fc29.src.rpm'
   tool-version csmock-2.1.1.20180626.174209.g3ea3888-1.fc27

References

   1. file://localhost/tmp/tmpjGL4G8.html#def1
   2. file://localhost/tmp/tmpjGL4G8.html#def2
   3. file://localhost/tmp/tmpjGL4G8.html#def3
   4. file://localhost/tmp/tmpjGL4G8.html#def4
   5. file://localhost/tmp/tmpjGL4G8.html#def5
   6. file://localhost/tmp/tmpjGL4G8.html#def6
   7. file://localhost/tmp/tmpjGL4G8.html#def7
   8. file://localhost/tmp/tmpjGL4G8.html#def8
   9. file://localhost/tmp/tmpjGL4G8.html#def9
  10. file://localhost/tmp/tmpjGL4G8.html#def10
  11. file://localhost/tmp/tmpjGL4G8.html#def11
  12. file://localhost/tmp/tmpjGL4G8.html#def12
  13. file://localhost/tmp/tmpjGL4G8.html#def13

Reply via email to