In archive_read_support_format_tar.c we mask a mode with ~
0777777 to
erase the non-ACL octal digits. The mode is represented by int64_t so
the compiler sign-extends the our literal mask from type int to int64_t
for application of the & operator.
Unfortunately the resulting int64_t type is not allowed in switch() on
some old compilers (like HP). Since we are looking only for values that
fit in an int after the mask anyway, we might as well cast to int for
the entire mask operation. This also avoids depending on the compiler
to preserve the intention of the mask with sign-extension, making the
code easier to understand anyway.
SVN-Revision: 1656
}
p++;
}
- switch (type & ~0777777) {
+ switch ((int)type & ~0777777) {
case 01000000:
/* POSIX.1e ACL */
break;