D: [iurt_root_command] chroot
Building target platforms: x86_64
Building for target x86_64
Installing /home/pterjan/rpmbuild/SRPMS/taper-7.0-0.pre1.22.mga10.src.rpm
Executing(%mkbuilddir): /bin/sh -e /home/pterjan/rpmbuild/tmp/rpm-tmp.uXnz1J
Executing(%prep): /bin/sh -e /home/pterjan/rpmbuild/tmp/rpm-tmp.1SOm6m
+ umask 022
+ cd /home/pterjan/rpmbuild/BUILD/taper-7.0-build
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ cd /home/pterjan/rpmbuild/BUILD/taper-7.0-build
+ rm -rf taper-7.0pre-1
+ /usr/lib/rpm/rpmuncompress -x /home/pterjan/rpmbuild/SOURCES/taper-7.0pre1.tar.bz2
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd taper-7.0pre-1
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ echo 'Patch #1 (taper-7.0pre1-remove-conflicting-type.patch):'
Patch #1 (taper-7.0pre1-remove-conflicting-type.patch):
+ /usr/bin/patch --no-backup-if-mismatch -f -p1 -b --suffix .type_conflict --fuzz=0
patching file non-ansi.h
+ echo 'Patch #2 (taper-7.0pre-1-umode_t.patch):'
Patch #2 (taper-7.0pre-1-umode_t.patch):
+ /usr/bin/patch --no-backup-if-mismatch -f -p1 -b --suffix .umode_t --fuzz=0
patching file config.h
patching file select_box.c
patching file select_box.h
+ echo 'Patch #3 (taper-7.0pre1-LDFLAGS.diff):'
Patch #3 (taper-7.0pre1-LDFLAGS.diff):
+ /usr/bin/patch --no-backup-if-mismatch -f -p0 -b --suffix .LDFLAGS --fuzz=0
patching file Makefile
+ echo 'Patch #4 (taper-fix-build-with-gcc14.patch):'
Patch #4 (taper-fix-build-with-gcc14.patch):
+ /usr/bin/patch --no-backup-if-mismatch -f -p1 -b --suffix .gcc14 --fuzz=0
patching file endianize.c
patching file utils.c
patching file sel_backup.c
patching file common.c
patching file sel_restore.c
patching file taper.c
patching file select_box.c
patching file compress/lzrw3.h
+ find . -name CVS -type d
+ xargs rm -rf
+ sed -i -e 's|755 --strip|755|g' Makefile
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /home/pterjan/rpmbuild/tmp/rpm-tmp.P2UhkQ
+ umask 022
+ cd /home/pterjan/rpmbuild/BUILD/taper-7.0-build
+ CFLAGS='-O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full '
+ export FFLAGS
+ FCFLAGS='-O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full '
+ export FCFLAGS
+ VALAFLAGS=-g
+ export VALAFLAGS
+ RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none --cap-lints=warn'
+ export RUSTFLAGS
+ LDFLAGS='-Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,-O1 -Wl,--build-id=sha1 -Wl,--enable-new-dtags -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
+ export LDFLAGS
+ LT_SYS_LIBRARY_PATH=/usr/lib64:
+ export LT_SYS_LIBRARY_PATH
+ CC=gcc
+ export CC
+ CXX=g++
+ export CXX
+ cd taper-7.0pre-1
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ /usr/bin/make -O -j16 V=1 VERBOSE=1 'CFLAGS=-O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -O3 -fno-strength-reduce -Wall' 'LDFLAGS=-Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,-O1 -Wl,--build-id=sha1 -Wl,--enable-new-dtags -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
echo "#define CUR_VERSION \""7.0pre-1"\"" > version.h
gcc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -O3 -fno-strength-reduce -Wall -DLINUX -D_GNU_SOURCE -Dlint	 -DTRIPLE_BUFFER               -D__USE_FILE_OFFSET64  -DGLIBC_2 -DBSD_SIGNALS -I/usr/include/ncurses -o memory.o -c memory.c
gcc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -O3 -fno-strength-reduce -Wall -DLINUX -D_GNU_SOURCE -Dlint	 -DTRIPLE_BUFFER               -D__USE_FILE_OFFSET64  -DGLIBC_2 -DBSD_SIGNALS -I/usr/include/ncurses -o vars.o -c vars.c
gcc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -O3 -fno-strength-reduce -Wall -DLINUX -D_GNU_SOURCE -Dlint	 -DTRIPLE_BUFFER               -D__USE_FILE_OFFSET64  -DGLIBC_2 -DBSD_SIGNALS -I/usr/include/ncurses -o restore.o -c restore.c
In file included from taper.h:55,
                 from restore.c:15:
restore.c: In function 'restore_start_child':
rmt.h:79:47: error: too many arguments to function '__rmt_close'; expected 0, have 1
   79 | #define rmtclose(fd)            (_isrmt(fd) ? __rmt_close(fd - __REM_BIAS) : close(fd))
      |                                               ^~~~~~~~~~~
restore.c:315:9: note: in expansion of macro 'rmtclose'
  315 |         rmtclose(dv);
      |         ^~~~~~~~
rmt.h:93:5: note: declared here
   93 | int __rmt_close ();
      |     ^~~~~~~~~~~
restore.c: In function 'read_vol_dir':
restore.c:575:37: warning: pointer targets in passing argument 2 of 'do_read_vol_dir' differ in signedness [-Wpointer-sign]
  575 |     if (do_read_vol_dir(archive_id, tape, O_RDONLY, TRUE, TRUE, TRUE) ==  TAPE_EXIST)
      |                                     ^~~~
      |                                     |
      |                                     signed char *
In file included from taper.h:50:
common.h:26:56: note: expected 'char *' but argument is of type 'signed char *'
   26 | extern _errstat do_read_vol_dir(_u32 archive_id, char *tape, int mode, _s8 rvdir, _s8 exist, _s8 open_index);
      |                                                  ~~~~~~^~~~
restore.c: In function 'print_diff':
restore.c:652:15: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
  652 |               while (*xx++); xx +=sizeof(_s32); while (*xx++);
      |               ^~~~~
restore.c:652:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
  652 |               while (*xx++); xx +=sizeof(_s32); while (*xx++);
      |                              ^~
restore.c: In function 'print_voldir':
restore.c:729:36: warning: pointer targets in passing argument 4 of 'ntraverse' differ in signedness [-Wpointer-sign]
  729 |     x = ntraverse(0, &i_key, NULL, &c, TRAVERSE_TOP, INFO_NAME);
      |                                    ^~
      |                                    |
      |                                    _s32 * {aka int *}
common.h:119:26: note: expected 'dskblk *' {aka 'unsigned int *'} but argument is of type '_s32 *' {aka 'int *'}
  119 |                  dskblk *rec, char command, int index); /* Traverse the tree */
      |                  ~~~~~~~~^~~
restore.c:743:40: warning: pointer targets in passing argument 4 of 'ntraverse' differ in signedness [-Wpointer-sign]
  743 |         x = ntraverse(0, &i_key, NULL, &c, TRAVERSE_CONTINUE, INFO_NAME);
      |                                        ^~
      |                                        |
      |                                        _s32 * {aka int *}
common.h:119:26: note: expected 'dskblk *' {aka 'unsigned int *'} but argument is of type '_s32 *' {aka 'int *'}
  119 |                  dskblk *rec, char command, int index); /* Traverse the tree */
      |                  ~~~~~~~~^~~
restore.c: In function 'restore_start_child':
restore.c:316:9: warning: ignoring return value of 'chdir' declared with attribute 'warn_unused_result' [-Wunused-result]
  316 |         chdir(original_cur_dir);
      |         ^~~~~~~~~~~~~~~~~~~~~~~
restore.c: In function 'restore_mfn':
restore.c:766:9: warning: ignoring return value of 'read' declared with attribute 'warn_unused_result' [-Wunused-result]
  766 |         read(fd, &ifd, sizeof(ifd));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
restore.c: In function 'taper_restore':
restore.c:971:9: warning: ignoring return value of 'chdir' declared with attribute 'warn_unused_result' [-Wunused-result]
  971 |         chdir(original_cur_dir);                 /* change directory to ensure */
      |         ^~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:82: restore.o] Error 1
make: *** Waiting for unfinished jobs....
gcc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -O3 -fno-strength-reduce -Wall -DLINUX -D_GNU_SOURCE -Dlint	 -DTRIPLE_BUFFER               -D__USE_FILE_OFFSET64  -DGLIBC_2 -DBSD_SIGNALS -I/usr/include/ncurses -o backup.o -c backup.c
In file included from taper.h:55,
                 from backup.c:94:
backup.c: In function 'do_backup':
rmt.h:79:47: error: too many arguments to function '__rmt_close'; expected 0, have 1
   79 | #define rmtclose(fd)            (_isrmt(fd) ? __rmt_close(fd - __REM_BIAS) : close(fd))
      |                                               ^~~~~~~~~~~
backup.c:641:15: note: in expansion of macro 'rmtclose'
  641 |               rmtclose(dv);
      |               ^~~~~~~~
rmt.h:93:5: note: declared here
   93 | int __rmt_close ();
      |     ^~~~~~~~~~~
backup.c: In function 'check_backup':
backup.c:926:21: warning: pointer targets in passing argument 1 of 'strchr' differ in signedness [-Wpointer-sign]
  926 |     if ((fd=rmtopen(tape, O_RDONLY, S_IRWXU)) == -1) {
      |                     ^~~~
      |                     |
      |                     signed char *
rmt.h:67:62: note: in definition of macro '_remdev'
   67 | #define _remdev(path)   (!f_force_local && (__rmt_path=index(path, ':')))
      |                                                              ^~~~
backup.c:926:13: note: in expansion of macro 'rmtopen'
  926 |     if ((fd=rmtopen(tape, O_RDONLY, S_IRWXU)) == -1) {
      |             ^~~~~~~
In file included from taper.h:18:
/usr/include/string.h:246:34: note: expected 'const char *' but argument is of type 'signed char *'
  246 | extern char *strchr (const char *__s, int __c)
      |                      ~~~~~~~~~~~~^~~
rmt.h:70:51: error: too many arguments to function '__rmt_open'; expected 0, have 4
   70 | #define rmtopen(path,oflag,mode) (_remdev(path) ? __rmt_open(path, oflag, mode, __REM_BIAS) : open(path, oflag, mode))
      |                                                   ^~~~~~~~~~
backup.c:926:13: note: in expansion of macro 'rmtopen'
  926 |     if ((fd=rmtopen(tape, O_RDONLY, S_IRWXU)) == -1) {
      |             ^~~~~~~
rmt.h:92:5: note: declared here
   92 | int __rmt_open ();
      |     ^~~~~~~~~~
backup.c:926:21: warning: pointer targets in passing argument 1 of 'open' differ in signedness [-Wpointer-sign]
  926 |     if ((fd=rmtopen(tape, O_RDONLY, S_IRWXU)) == -1) {
      |                     ^~~~
      |                     |
      |                     signed char *
rmt.h:70:100: note: in definition of macro 'rmtopen'
   70 | #define rmtopen(path,oflag,mode) (_remdev(path) ? __rmt_open(path, oflag, mode, __REM_BIAS) : open(path, oflag, mode))
      |                                                                                                    ^~~~
In file included from /usr/include/fcntl.h:341,
                 from taper.h:26:
/usr/include/bits/fcntl2.h:43:19: note: expected 'const char *' but argument is of type 'signed char *'
   43 | open (const char *__path, int __oflag, ...)
      |       ~~~~~~~~~~~~^~~~~~
backup.c:930:25: warning: pointer targets in passing argument 1 of 'creat' differ in signedness [-Wpointer-sign]
  930 |             close(creat(tape, S_IREAD|S_IWRITE));
      |                         ^~~~
      |                         |
      |                         signed char *
/usr/include/fcntl.h:255:31: note: expected 'const char *' but argument is of type 'signed char *'
  255 | extern int creat (const char *__file, mode_t __mode) __nonnull ((1));
      |                   ~~~~~~~~~~~~^~~~~~
rmt.h:79:47: error: too many arguments to function '__rmt_close'; expected 0, have 1
   79 | #define rmtclose(fd)            (_isrmt(fd) ? __rmt_close(fd - __REM_BIAS) : close(fd))
      |                                               ^~~~~~~~~~~
backup.c:937:9: note: in expansion of macro 'rmtclose'
  937 |         rmtclose(fd);
      |         ^~~~~~~~
rmt.h:93:5: note: declared here
   93 | int __rmt_close ();
      |     ^~~~~~~~~~~
backup.c:938:32: warning: pointer targets in passing argument 2 of 'do_read_vol_dir' differ in signedness [-Wpointer-sign]
  938 |         x= do_read_vol_dir(-1, tape, O_RDWR, append, FALSE, TRUE);
      |                                ^~~~
      |                                |
      |                                signed char *
In file included from taper.h:50:
common.h:26:56: note: expected 'char *' but argument is of type 'signed char *'
   26 | extern _errstat do_read_vol_dir(_u32 archive_id, char *tape, int mode, _s8 rvdir, _s8 exist, _s8 open_index);
      |                                                  ~~~~~~^~~~
backup.c:976:20: warning: pointer targets in passing argument 1 of 'unlink' differ in signedness [-Wpointer-sign]
  976 |             unlink(tape);                                /* regular files get deleted */
      |                    ^~~~
      |                    |
      |                    signed char *
In file included from taper.h:27:
/usr/include/unistd.h:858:32: note: expected 'const char *' but argument is of type 'signed char *'
  858 | extern int unlink (const char *__name) __THROW __nonnull ((1));
      |                    ~~~~~~~~~~~~^~~~~~
backup.c:977:25: warning: pointer targets in passing argument 1 of 'creat' differ in signedness [-Wpointer-sign]
  977 |             close(creat(tape, S_IREAD|S_IWRITE));/* and re-created to get zero length */
      |                         ^~~~
      |                         |
      |                         signed char *
/usr/include/fcntl.h:255:31: note: expected 'const char *' but argument is of type 'signed char *'
  255 | extern int creat (const char *__file, mode_t __mode) __nonnull ((1));
      |                   ~~~~~~~~~~~~^~~~~~
backup.c: In function 'backup_file':
backup.c:202:9: warning: ignoring return value of 'readlink' declared with attribute 'warn_unused_result' [-Wunused-result]
  202 |         readlink(fn, tmpf, sizeof(tmpf));        /* is written */
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
backup.c: In function 'do_backup':
backup.c:642:15: warning: ignoring return value of 'chdir' declared with attribute 'warn_unused_result' [-Wunused-result]
  642 |               chdir(original_cur_dir);
      |               ^~~~~~~~~~~~~~~~~~~~~~~
backup.c:782:14: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  782 |     if (mf) {write(mf, sa[2], strlen(sa[2])); write(mf, "\n", 1);}
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
backup.c:782:47: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  782 |     if (mf) {write(mf, sa[2], strlen(sa[2])); write(mf, "\n", 1);}
      |                                               ^~~~~~~~~~~~~~~~~~
backup.c:790:14: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  790 |     if (mf) {write(mf, sa[3], strlen(sa[3])); write(mf, "\n", 1);}
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
backup.c:790:47: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  790 |     if (mf) {write(mf, sa[3], strlen(sa[3])); write(mf, "\n", 1);}
      |                                               ^~~~~~~~~~~~~~~~~~
backup.c:794:14: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  794 |     if (mf) {write(mf, sa[5], strlen(sa[5])); write(mf, "\n", 1);}
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
backup.c:794:47: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  794 |     if (mf) {write(mf, sa[5], strlen(sa[5])); write(mf, "\n", 1);}
      |                                               ^~~~~~~~~~~~~~~~~~
backup.c:799:14: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  799 |     if (mf) {write(mf, sa[6], strlen(sa[6])); write(mf, "\n", 1);}
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
backup.c:799:47: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  799 |     if (mf) {write(mf, sa[6], strlen(sa[6])); write(mf, "\n", 1);}
      |                                               ^~~~~~~~~~~~~~~~~~
backup.c:803:14: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  803 |     if (mf) {write(mf, sa[8], strlen(sa[8])); write(mf, "\n", 1);}
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
backup.c:803:47: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  803 |     if (mf) {write(mf, sa[8], strlen(sa[8])); write(mf, "\n", 1);}
      |                                               ^~~~~~~~~~~~~~~~~~
backup.c: In function 'add_to_set':
backup.c:819:17: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  819 |                 write(mf, "  Selected ", strlen("  Selected "));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
backup.c:823:17: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  823 |                 write(mf, "  Excluded ", strlen("  Excluded "));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
backup.c:825:13: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  825 |             write(mf, ln, strlen(ln));
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~
backup.c:826:13: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  826 |             write(mf, " from fileset\n", strlen(" from fileset\n"));
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
backup.c: In function 'read_in_fileset':
backup.c:856:17: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  856 |                 write(mf, ln, strlen(ln));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
backup.c:858:17: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  858 |                 write(mf, ln, strlen(ln));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
backup.c:866:21: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  866 |                     write(mf, ln, strlen(ln));
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~
backup.c:870:17: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  870 |                 write(mf, ln, strlen(ln));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
backup.c:875:25: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  875 |                         write(mf, ln, strlen(ln));
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
backup.c:877:25: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  877 |                         write(mf, ln, strlen(ln));
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
backup.c:885:25: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  885 |                         write(mf, s, strlen(s));
      |                         ^~~~~~~~~~~~~~~~~~~~~~~
backup.c:893:21: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  893 |                     write(mf, s, strlen(s));
      |                     ^~~~~~~~~~~~~~~~~~~~~~~
backup.c:901:5: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  901 |     write(mf, ln, strlen(ln));
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
backup.c:907:21: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  907 |             if (mf) write(mf, s, strlen(s));
      |                     ^~~~~~~~~~~~~~~~~~~~~~~
backup.c:909:21: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  909 |             if (mf) write(mf, "Backup NOT made\n", strlen("Backup NOT made\n"));
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
backup.c: In function 'check_backup':
backup.c:948:25: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  948 |                 if (mf) write(mf, "Unknown data on tape. Tape not overwritten.\n",
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  949 |                               strlen("Unknown data on tape. Tape not overwritten.\n"));
      |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
backup.c:950:25: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  950 |                 if (mf) write(mf, "Use --tape-overwrite-on [+O] to force overwriting\n",
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  951 |                               strlen("Use --tape-overwrite-on [+O] to force overwriting\n"));
      |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
backup.c: In function 'taper_backup':
backup.c:1048:9: warning: ignoring return value of 'chdir' declared with attribute 'warn_unused_result' [-Wunused-result]
 1048 |         chdir(cur_dir);
      |         ^~~~~~~~~~~~~~
backup.c:1058:9: warning: ignoring return value of 'getcwd' declared with attribute 'warn_unused_result' [-Wunused-result]
 1058 |         getcwd(cur_dir, sizeof(cur_dir));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:82: backup.o] Error 1
gcc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -O3 -fno-strength-reduce -Wall -DLINUX -D_GNU_SOURCE -Dlint	 -DTRIPLE_BUFFER               -D__USE_FILE_OFFSET64  -DGLIBC_2 -DBSD_SIGNALS -I/usr/include/ncurses -o rtapelib.o -c rtapelib.c
rtapelib.c: In function '_rmt_shutdown':
rtapelib.c:100:1: warning: old-style function definition [-Wold-style-definition]
  100 | _rmt_shutdown (fildes)
      | ^~~~~~~~~~~~~
rtapelib.c: In function 'command':
rtapelib.c:114:1: warning: old-style function definition [-Wold-style-definition]
  114 | command (fildes, buf)
      | ^~~~~~~
rtapelib.c:123:16: error: assignment to 'void (*)(void)' from incompatible pointer type '__sighandler_t' {aka 'void (*)(int)'} [-Wincompatible-pointer-types]
  123 |   pipe_handler = signal (SIGPIPE, SIG_IGN);
      |                ^
In file included from taper.h:30,
                 from rtapelib.c:34:
/usr/include/signal.h:72:16: note: '__sighandler_t' declared here
   72 | typedef void (*__sighandler_t) (int);
      |                ^~~~~~~~~~~~~~
rtapelib.c:127:24: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
  127 |       signal (SIGPIPE, pipe_handler);
      |                        ^~~~~~~~~~~~
      |                        |
      |                        void (*)(void)
/usr/include/signal.h:88:57: note: expected '__sighandler_t' {aka 'void (*)(int)'} but argument is of type 'void (*)(void)'
   88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
      |                                          ~~~~~~~~~~~~~~~^~~~~~~~~
/usr/include/signal.h:72:16: note: '__sighandler_t' declared here
   72 | typedef void (*__sighandler_t) (int);
      |                ^~~~~~~~~~~~~~
rtapelib.c:133:20: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
  133 |   signal (SIGPIPE, pipe_handler);
      |                    ^~~~~~~~~~~~
      |                    |
      |                    void (*)(void)
/usr/include/signal.h:88:57: note: expected '__sighandler_t' {aka 'void (*)(int)'} but argument is of type 'void (*)(void)'
   88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
      |                                          ~~~~~~~~~~~~~~~^~~~~~~~~
/usr/include/signal.h:72:16: note: '__sighandler_t' declared here
   72 | typedef void (*__sighandler_t) (int);
      |                ^~~~~~~~~~~~~~
rtapelib.c: In function 'status':
rtapelib.c:143:1: warning: old-style function definition [-Wold-style-definition]
  143 | status (fildes)
      | ^~~~~~
rtapelib.c: In function '__rmt_open':
rtapelib.c:269:1: warning: old-style function definition [-Wold-style-definition]
  269 | __rmt_open (path, oflag, mode, bias)
      | ^~~~~~~~~~
rtapelib.c:274:1: error: number of arguments doesn't match prototype
  274 | {
      | ^
In file included from taper.h:55:
rmt.h:92:5: error: prototype declaration
   92 | int __rmt_open ();
      |     ^~~~~~~~~~
rtapelib.c: In function '__rmt_close':
rtapelib.c:426:1: warning: old-style function definition [-Wold-style-definition]
  426 | __rmt_close (fildes)
      | ^~~~~~~~~~~
rtapelib.c:428:1: error: number of arguments doesn't match prototype
  428 | {
      | ^
rmt.h:93:5: error: prototype declaration
   93 | int __rmt_close ();
      |     ^~~~~~~~~~~
rtapelib.c: In function '__rmt_read':
rtapelib.c:443:1: warning: old-style function definition [-Wold-style-definition]
  443 | __rmt_read (fildes, buf, nbyte)
      | ^~~~~~~~~~
rtapelib.c:447:1: error: number of arguments doesn't match prototype
  447 | {
      | ^
rmt.h:94:5: error: prototype declaration
   94 | int __rmt_read ();
      |     ^~~~~~~~~~
rtapelib.c: In function '__rmt_write':
rtapelib.c:473:1: warning: old-style function definition [-Wold-style-definition]
  473 | __rmt_write (fildes, buf, nbyte)
      | ^~~~~~~~~~~
rtapelib.c:477:1: error: number of arguments doesn't match prototype
  477 | {
      | ^
rmt.h:95:5: error: prototype declaration
   95 | int __rmt_write ();
      |     ^~~~~~~~~~~
rtapelib.c:485:16: error: assignment to 'void (*)(void)' from incompatible pointer type '__sighandler_t' {aka 'void (*)(int)'} [-Wincompatible-pointer-types]
  485 |   pipe_handler = signal (SIGPIPE, SIG_IGN);
      |                ^
/usr/include/signal.h:72:16: note: '__sighandler_t' declared here
   72 | typedef void (*__sighandler_t) (int);
      |                ^~~~~~~~~~~~~~
rtapelib.c:488:24: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
  488 |       signal (SIGPIPE, pipe_handler);
      |                        ^~~~~~~~~~~~
      |                        |
      |                        void (*)(void)
/usr/include/signal.h:88:57: note: expected '__sighandler_t' {aka 'void (*)(int)'} but argument is of type 'void (*)(void)'
   88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
      |                                          ~~~~~~~~~~~~~~~^~~~~~~~~
/usr/include/signal.h:72:16: note: '__sighandler_t' declared here
   72 | typedef void (*__sighandler_t) (int);
      |                ^~~~~~~~~~~~~~
rtapelib.c:493:20: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
  493 |   signal (SIGPIPE, pipe_handler);
      |                    ^~~~~~~~~~~~
      |                    |
      |                    void (*)(void)
/usr/include/signal.h:88:57: note: expected '__sighandler_t' {aka 'void (*)(int)'} but argument is of type 'void (*)(void)'
   88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
      |                                          ~~~~~~~~~~~~~~~^~~~~~~~~
/usr/include/signal.h:72:16: note: '__sighandler_t' declared here
   72 | typedef void (*__sighandler_t) (int);
      |                ^~~~~~~~~~~~~~
rtapelib.c: In function '__rmt_lseek':
rtapelib.c:503:1: warning: old-style function definition [-Wold-style-definition]
  503 | __rmt_lseek (fildes, offset, whence)
      | ^~~~~~~~~~~
rtapelib.c:507:1: error: number of arguments doesn't match prototype
  507 | {
      | ^
rmt.h:96:6: error: prototype declaration
   96 | long __rmt_lseek ();
      |      ^~~~~~~~~~~
rtapelib.c: In function '__rmt_ioctl':
rtapelib.c:522:1: warning: old-style function definition [-Wold-style-definition]
  522 | __rmt_ioctl (fildes, op, arg)
      | ^~~~~~~~~~~
rtapelib.c:525:1: error: number of arguments doesn't match prototype
  525 | {
      | ^
rmt.h:97:5: error: prototype declaration
   97 | int __rmt_ioctl ();
      |     ^~~~~~~~~~~
rtapelib.c: In function '__rmt_open':
rtapelib.c:363:7: warning: ignoring return value of 'dup' declared with attribute 'warn_unused_result' [-Wunused-result]
  363 |       dup (to_rmt[i][0]);
      |       ^~~~~~~~~~~~~~~~~~
rtapelib.c:368:7: warning: ignoring return value of 'dup' declared with attribute 'warn_unused_result' [-Wunused-result]
  368 |       dup (from_rmt[i][1]);
      |       ^~~~~~~~~~~~~~~~~~~~
rtapelib.c:372:7: warning: ignoring return value of 'setuid' declared with attribute 'warn_unused_result' [-Wunused-result]
  372 |       setuid (getuid ());
      |       ^~~~~~~~~~~~~~~~~~
rtapelib.c:373:7: warning: ignoring return value of 'setgid' declared with attribute 'warn_unused_result' [-Wunused-result]
  373 |       setgid (getgid ());
      |       ^~~~~~~~~~~~~~~~~~
make: *** [Makefile:82: rtapelib.o] Error 1
gcc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -O3 -fno-strength-reduce -Wall -DLINUX -D_GNU_SOURCE -Dlint	 -DTRIPLE_BUFFER               -D__USE_FILE_OFFSET64  -DGLIBC_2 -DBSD_SIGNALS -I/usr/include/ncurses -o utils.o -c utils.c
In file included from taper.h:55,
                 from utils.c:14:
utils.c: In function 'utils_write_nullheader':
rmt.h:77:47: error: too many arguments to function '__rmt_write'; expected 0, have 3
   77 | #define rmtwrite(fd, buf, n)    (_isrmt(fd) ? __rmt_write(fd - __REM_BIAS, buf, n) : write(fd, buf, n))
      |                                               ^~~~~~~~~~~
utils.c:41:9: note: in expansion of macro 'rmtwrite'
   41 |     if (rmtwrite(dv, write_buffer, block_size) != block_size)
      |         ^~~~~~~~
rmt.h:95:5: note: declared here
   95 | int __rmt_write ();
      |     ^~~~~~~~~~~
utils.c: In function 'utils_test_eot':
rmt.h:77:47: error: too many arguments to function '__rmt_write'; expected 0, have 3
   77 | #define rmtwrite(fd, buf, n)    (_isrmt(fd) ? __rmt_write(fd - __REM_BIAS, buf, n) : write(fd, buf, n))
      |                                               ^~~~~~~~~~~
utils.c:291:13: note: in expansion of macro 'rmtwrite'
  291 |         if (rmtwrite(dv, m, block_size) <block_size) break;
      |             ^~~~~~~~
rmt.h:95:5: note: declared here
   95 | int __rmt_write ();
      |     ^~~~~~~~~~~
rmt.h:76:47: error: too many arguments to function '__rmt_read'; expected 0, have 3
   76 | #define rmtread(fd, buf, n)     (_isrmt(fd) ? __rmt_read(fd - __REM_BIAS, buf, n) : read(fd, buf, n))
      |                                               ^~~~~~~~~~
utils.c:300:13: note: in expansion of macro 'rmtread'
  300 |         if (rmtread(dv, m, block_size) < block_size) break;
      |             ^~~~~~~
rmt.h:94:5: note: declared here
   94 | int __rmt_read ();
      |     ^~~~~~~~~~
rmt.h:76:47: error: too many arguments to function '__rmt_read'; expected 0, have 3
   76 | #define rmtread(fd, buf, n)     (_isrmt(fd) ? __rmt_read(fd - __REM_BIAS, buf, n) : read(fd, buf, n))
      |                                               ^~~~~~~~~~
utils.c:306:10: note: in expansion of macro 'rmtread'
  306 |     rc = rmtread(dv, m, block_size);
      |          ^~~~~~~
rmt.h:94:5: note: declared here
   94 | int __rmt_read ();
      |     ^~~~~~~~~~
utils.c: In function 'utils_whereproc':
utils.c:342:41: warning: format '%lld' expects argument of type 'long long int', but argument 4 has type '__dev_t' {aka 'long unsigned int'} [-Wformat=]
  342 |         sprintf(s1, "%s is on device %lld", s, buf.st_dev);
      |                                      ~~~^      ~~~~~~~~~~
      |                                         |         |
      |                                         |         __dev_t {aka long unsigned int}
      |                                         long long int
      |                                      %ld
utils.c: In function 'utils_reindex':
utils.c:481:31: warning: pointer targets in passing argument 2 of 'do_read_vol_dir' differ in signedness [-Wpointer-sign]
  481 |     if (do_read_vol_dir(arch, tape, O_RDONLY, TRUE, TRUE, FALSE) == -1)
      |                               ^~~~
      |                               |
      |                               signed char *
In file included from taper.h:50:
common.h:26:56: note: expected 'char *' but argument is of type 'signed char *'
   26 | extern _errstat do_read_vol_dir(_u32 archive_id, char *tape, int mode, _s8 rvdir, _s8 exist, _s8 open_index);
      |                                                  ~~~~~~^~~~
utils.c:460:17: warning: variable 'vols' set but not used [-Wunused-but-set-variable]
  460 |     static _s32 vols;                            /* needs to be */
      |                 ^~~~
utils.c: In function 'utils_test_mktape':
rmt.h:76:47: error: too many arguments to function '__rmt_read'; expected 0, have 3
   76 | #define rmtread(fd, buf, n)     (_isrmt(fd) ? __rmt_read(fd - __REM_BIAS, buf, n) : read(fd, buf, n))
      |                                               ^~~~~~~~~~
utils.c:547:9: note: in expansion of macro 'rmtread'
  547 |     x = rmtread(dv, write_buffer, block_size);
      |         ^~~~~~~
rmt.h:94:5: note: declared here
   94 | int __rmt_read ();
      |     ^~~~~~~~~~
rmt.h:76:47: error: too many arguments to function '__rmt_read'; expected 0, have 3
   76 | #define rmtread(fd, buf, n)     (_isrmt(fd) ? __rmt_read(fd - __REM_BIAS, buf, n) : read(fd, buf, n))
      |                                               ^~~~~~~~~~
utils.c:568:9: note: in expansion of macro 'rmtread'
  568 |     x = rmtread(dv, write_buffer, block_size);
      |         ^~~~~~~
rmt.h:94:5: note: declared here
   94 | int __rmt_read ();
      |     ^~~~~~~~~~
utils.c: In function 'utils_testlinks_dpd':
utils.c:598:5: warning: ignoring return value of 'getcwd' declared with attribute 'warn_unused_result' [-Wunused-result]
  598 |     getcwd(olddir, sizeof(olddir));              /* save current directory */
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
utils.c:600:5: warning: ignoring return value of 'getcwd' declared with attribute 'warn_unused_result' [-Wunused-result]
  600 |     getcwd(curdir, sizeof(curdir));
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
utils.c:605:9: warning: ignoring return value of 'chdir' declared with attribute 'warn_unused_result' [-Wunused-result]
  605 |         chdir(olddir);
      |         ^~~~~~~~~~~~~
utils.c:611:13: warning: ignoring return value of 'chdir' declared with attribute 'warn_unused_result' [-Wunused-result]
  611 |             chdir(olddir);
      |             ^~~~~~~~~~~~~
utils.c: In function 'utils_testlinks':
utils.c:631:5: warning: ignoring return value of 'getcwd' declared with attribute 'warn_unused_result' [-Wunused-result]
  631 |     getcwd(olddir, sizeof(olddir));
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
utils.c:632:5: warning: ignoring return value of 'chdir' declared with attribute 'warn_unused_result' [-Wunused-result]
  632 |     chdir(s); getcwd(s, sizeof(s));
      |     ^~~~~~~~
utils.c:632:15: warning: ignoring return value of 'getcwd' declared with attribute 'warn_unused_result' [-Wunused-result]
  632 |     chdir(s); getcwd(s, sizeof(s));
      |               ^~~~~~~~~~~~~~~~~~~~
utils.c:633:5: warning: ignoring return value of 'chdir' declared with attribute 'warn_unused_result' [-Wunused-result]
  633 |     chdir(olddir);
      |     ^~~~~~~~~~~~~
make: *** [Makefile:82: utils.o] Error 1
gcc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -O3 -fno-strength-reduce -Wall -DLINUX -D_GNU_SOURCE -Dlint	 -DTRIPLE_BUFFER               -D__USE_FILE_OFFSET64  -DGLIBC_2 -DBSD_SIGNALS -I/usr/include/ncurses -o tapeio.o -c tapeio.c
In file included from taper.h:55,
                 from tapeio.c:14:
tapeio.c: In function 'raw_read':
rmt.h:76:47: error: too many arguments to function '__rmt_read'; expected 0, have 3
   76 | #define rmtread(fd, buf, n)     (_isrmt(fd) ? __rmt_read(fd - __REM_BIAS, buf, n) : read(fd, buf, n))
      |                                               ^~~~~~~~~~
tapeio.c:36:13: note: in expansion of macro 'rmtread'
   36 |         x = rmtread(fd, data+rc, count-rc);
      |             ^~~~~~~
rmt.h:94:5: note: declared here
   94 | int __rmt_read ();
      |     ^~~~~~~~~~
rmt.h:76:47: error: too many arguments to function '__rmt_read'; expected 0, have 3
   76 | #define rmtread(fd, buf, n)     (_isrmt(fd) ? __rmt_read(fd - __REM_BIAS, buf, n) : read(fd, buf, n))
      |                                               ^~~~~~~~~~
tapeio.c:77:18: note: in expansion of macro 'rmtread'
   77 |             x1 = rmtread(fd, m, block_size);
      |                  ^~~~~~~
rmt.h:94:5: note: declared here
   94 | int __rmt_read ();
      |     ^~~~~~~~~~
tapeio.c: In function 'raw_write':
rmt.h:77:47: error: too many arguments to function '__rmt_write'; expected 0, have 3
   77 | #define rmtwrite(fd, buf, n)    (_isrmt(fd) ? __rmt_write(fd - __REM_BIAS, buf, n) : write(fd, buf, n))
      |                                               ^~~~~~~~~~~
tapeio.c:120:13: note: in expansion of macro 'rmtwrite'
  120 |         x = rmtwrite(fd, data+rc, count-rc);
      |             ^~~~~~~~
rmt.h:95:5: note: declared here
   95 | int __rmt_write ();
      |     ^~~~~~~~~~~
rmt.h:77:47: error: too many arguments to function '__rmt_write'; expected 0, have 3
   77 | #define rmtwrite(fd, buf, n)    (_isrmt(fd) ? __rmt_write(fd - __REM_BIAS, buf, n) : write(fd, buf, n))
      |                                               ^~~~~~~~~~~
tapeio.c:138:18: note: in expansion of macro 'rmtwrite'
  138 |             x1 = rmtwrite(fd, data+rc, block_size);      /* write a block */
      |                  ^~~~~~~~
rmt.h:95:5: note: declared here
   95 | int __rmt_write ();
      |     ^~~~~~~~~~~
tapeio.c:141:59: warning: format '%d' expects argument of type 'int', but argument 3 has type 'ssize_t' {aka 'long int'} [-Wformat=]
  141 |                 sprintf(s, "W:Writing in error loop - rc=%d, count=%d, x1=%d", rc, count, x1);
      |                                                          ~^                    ~~
      |                                                           |                    |
      |                                                           int                  ssize_t {aka long int}
      |                                                          %ld
tapeio.c:141:69: warning: format '%d' expects argument of type 'int', but argument 4 has type 'ssize_t' {aka 'long int'} [-Wformat=]
  141 |                 sprintf(s, "W:Writing in error loop - rc=%d, count=%d, x1=%d", rc, count, x1);
      |                                                                    ~^              ~~~~~
      |                                                                     |              |
      |                                                                     int            ssize_t {aka long int}
      |                                                                    %ld
tapeio.c:141:76: warning: format '%d' expects argument of type 'int', but argument 5 has type 'ssize_t' {aka 'long int'} [-Wformat=]
  141 |                 sprintf(s, "W:Writing in error loop - rc=%d, count=%d, x1=%d", rc, count, x1);
      |                                                                           ~^              ~~
      |                                                                            |              |
      |                                                                            int            ssize_t {aka long int}
      |                                                                           %ld
tapeio.c: In function 'tape_fsf':
rmt.h:78:47: error: too many arguments to function '__rmt_lseek'; expected 0, have 3
   78 | #define rmtlseek(fd, off, wh)   (_isrmt(fd) ? __rmt_lseek(fd - __REM_BIAS, off, wh) : lseek(fd, off, wh))
      |                                               ^~~~~~~~~~~
tapeio.c:196:28: note: in expansion of macro 'rmtlseek'
  196 |     x = (is_regfile(dv)) ? rmtlseek(dv, 0L, SEEK_END) :
      |                            ^~~~~~~~
rmt.h:96:6: note: declared here
   96 | long __rmt_lseek ();
      |      ^~~~~~~~~~~
rmt.h:81:47: error: too many arguments to function '__rmt_ioctl'; expected 0, have 3
   81 | #define rmtioctl(fd,req,arg)    (_isrmt(fd) ? __rmt_ioctl(fd - __REM_BIAS, req, arg) : ioctl(fd, req, arg))
      |                                               ^~~~~~~~~~~
tapeio.c:197:31: note: in expansion of macro 'rmtioctl'
  197 |                               rmtioctl(dv, MTIOCTOP, (char *) &m);
      |                               ^~~~~~~~
rmt.h:97:5: note: declared here
   97 | int __rmt_ioctl ();
      |     ^~~~~~~~~~~
tapeio.c: In function 'tape_eom':
rmt.h:78:47: error: too many arguments to function '__rmt_lseek'; expected 0, have 3
   78 | #define rmtlseek(fd, off, wh)   (_isrmt(fd) ? __rmt_lseek(fd - __REM_BIAS, off, wh) : lseek(fd, off, wh))
      |                                               ^~~~~~~~~~~
tapeio.c:222:28: note: in expansion of macro 'rmtlseek'
  222 |     x = (is_regfile(dv)) ? rmtlseek(dv, 0L, SEEK_END) :
      |                            ^~~~~~~~
rmt.h:96:6: note: declared here
   96 | long __rmt_lseek ();
      |      ^~~~~~~~~~~
rmt.h:81:47: error: too many arguments to function '__rmt_ioctl'; expected 0, have 3
   81 | #define rmtioctl(fd,req,arg)    (_isrmt(fd) ? __rmt_ioctl(fd - __REM_BIAS, req, arg) : ioctl(fd, req, arg))
      |                                               ^~~~~~~~~~~
tapeio.c:223:31: note: in expansion of macro 'rmtioctl'
  223 |                               rmtioctl(dv, MTIOCTOP, (char *) &m);
      |                               ^~~~~~~~
rmt.h:97:5: note: declared here
   97 | int __rmt_ioctl ();
      |     ^~~~~~~~~~~
tapeio.c: In function 'tape_seek':
rmt.h:78:47: error: too many arguments to function '__rmt_lseek'; expected 0, have 3
   78 | #define rmtlseek(fd, off, wh)   (_isrmt(fd) ? __rmt_lseek(fd - __REM_BIAS, off, wh) : lseek(fd, off, wh))
      |                                               ^~~~~~~~~~~
tapeio.c:241:9: note: in expansion of macro 'rmtlseek'
  241 |         rmtlseek(dv, block_size*(toblock-blocks_passed), SEEK_CUR);
      |         ^~~~~~~~
rmt.h:96:6: note: declared here
   96 | long __rmt_lseek ();
      |      ^~~~~~~~~~~
rmt.h:81:47: error: too many arguments to function '__rmt_ioctl'; expected 0, have 3
   81 | #define rmtioctl(fd,req,arg)    (_isrmt(fd) ? __rmt_ioctl(fd - __REM_BIAS, req, arg) : ioctl(fd, req, arg))
      |                                               ^~~~~~~~~~~
tapeio.c:281:9: note: in expansion of macro 'rmtioctl'
  281 |     if (rmtioctl(dv, MTIOCTOP, (char *) &m) != -1) {
      |         ^~~~~~~~
rmt.h:97:5: note: declared here
   97 | int __rmt_ioctl ();
      |     ^~~~~~~~~~~
tapeio.c: In function 'tape_readheader':
rmt.h:81:47: error: too many arguments to function '__rmt_ioctl'; expected 0, have 3
   81 | #define rmtioctl(fd,req,arg)    (_isrmt(fd) ? __rmt_ioctl(fd - __REM_BIAS, req, arg) : ioctl(fd, req, arg))
      |                                               ^~~~~~~~~~~
tapeio.c:452:17: note: in expansion of macro 'rmtioctl'
  452 |                 rmtioctl(dv, MTIOCTOP, (char *) &mt);   /* rewind */
      |                 ^~~~~~~~
rmt.h:97:5: note: declared here
   97 | int __rmt_ioctl ();
      |     ^~~~~~~~~~~
rmt.h:81:47: error: too many arguments to function '__rmt_ioctl'; expected 0, have 3
   81 | #define rmtioctl(fd,req,arg)    (_isrmt(fd) ? __rmt_ioctl(fd - __REM_BIAS, req, arg) : ioctl(fd, req, arg))
      |                                               ^~~~~~~~~~~
tapeio.c:463:25: note: in expansion of macro 'rmtioctl'
  463 |                         rmtioctl (dv, MTIOCTOP, (char *) &mt));
      |                         ^~~~~~~~
rmt.h:97:5: note: declared here
   97 | int __rmt_ioctl ();
      |     ^~~~~~~~~~~
rmt.h:79:47: error: too many arguments to function '__rmt_close'; expected 0, have 1
   79 | #define rmtclose(fd)            (_isrmt(fd) ? __rmt_close(fd - __REM_BIAS) : close(fd))
      |                                               ^~~~~~~~~~~
tapeio.c:465:17: note: in expansion of macro 'rmtclose'
  465 |                 rmtclose(dv);                    /* by close */
      |                 ^~~~~~~~
rmt.h:93:5: note: declared here
   93 | int __rmt_close ();
      |     ^~~~~~~~~~~
tapeio.c: In function 'tape_rewind_engine':
tapeio.c:599:24: warning: pointer targets in passing argument 1 of 'strchr' differ in signedness [-Wpointer-sign]
  599 |         if ((x=rmtopen(tape, O_RDWR, S_IRWXU)) == -1) /* try and open tape */
      |                        ^~~~
      |                        |
      |                        signed char *
rmt.h:67:62: note: in definition of macro '_remdev'
   67 | #define _remdev(path)   (!f_force_local && (__rmt_path=index(path, ':')))
      |                                                              ^~~~
tapeio.c:599:16: note: in expansion of macro 'rmtopen'
  599 |         if ((x=rmtopen(tape, O_RDWR, S_IRWXU)) == -1) /* try and open tape */
      |                ^~~~~~~
In file included from taper.h:18:
/usr/include/string.h:246:34: note: expected 'const char *' but argument is of type 'signed char *'
  246 | extern char *strchr (const char *__s, int __c)
      |                      ~~~~~~~~~~~~^~~
rmt.h:70:51: error: too many arguments to function '__rmt_open'; expected 0, have 4
   70 | #define rmtopen(path,oflag,mode) (_remdev(path) ? __rmt_open(path, oflag, mode, __REM_BIAS) : open(path, oflag, mode))
      |                                                   ^~~~~~~~~~
tapeio.c:599:16: note: in expansion of macro 'rmtopen'
  599 |         if ((x=rmtopen(tape, O_RDWR, S_IRWXU)) == -1) /* try and open tape */
      |                ^~~~~~~
rmt.h:92:5: note: declared here
   92 | int __rmt_open ();
      |     ^~~~~~~~~~
tapeio.c:599:24: warning: pointer targets in passing argument 1 of 'open' differ in signedness [-Wpointer-sign]
  599 |         if ((x=rmtopen(tape, O_RDWR, S_IRWXU)) == -1) /* try and open tape */
      |                        ^~~~
      |                        |
      |                        signed char *
rmt.h:70:100: note: in definition of macro 'rmtopen'
   70 | #define rmtopen(path,oflag,mode) (_remdev(path) ? __rmt_open(path, oflag, mode, __REM_BIAS) : open(path, oflag, mode))
      |                                                                                                    ^~~~
In file included from /usr/include/fcntl.h:341,
                 from taper.h:26:
/usr/include/bits/fcntl2.h:43:19: note: expected 'const char *' but argument is of type 'signed char *'
   43 | open (const char *__path, int __oflag, ...)
      |       ~~~~~~~~~~~~^~~~~~
rmt.h:81:47: error: too many arguments to function '__rmt_ioctl'; expected 0, have 3
   81 | #define rmtioctl(fd,req,arg)    (_isrmt(fd) ? __rmt_ioctl(fd - __REM_BIAS, req, arg) : ioctl(fd, req, arg))
      |                                               ^~~~~~~~~~~
tapeio.c:605:15: note: in expansion of macro 'rmtioctl'
  605 |         err = rmtioctl (x, MTIOCTOP, (char *) &m); /* do status if not regular file */
      |               ^~~~~~~~
rmt.h:97:5: note: declared here
   97 | int __rmt_ioctl ();
      |     ^~~~~~~~~~~
rmt.h:79:47: error: too many arguments to function '__rmt_close'; expected 0, have 1
   79 | #define rmtclose(fd)            (_isrmt(fd) ? __rmt_close(fd - __REM_BIAS) : close(fd))
      |                                               ^~~~~~~~~~~
tapeio.c:609:21: note: in expansion of macro 'rmtclose'
  609 |     if (opendevice) rmtclose(x);                 /* close */
      |                     ^~~~~~~~
rmt.h:93:5: note: declared here
   93 | int __rmt_close ();
      |     ^~~~~~~~~~~
tapeio.c: In function 'tape_set_blk_size':
rmt.h:81:47: error: too many arguments to function '__rmt_ioctl'; expected 0, have 3
   81 | #define rmtioctl(fd,req,arg)    (_isrmt(fd) ? __rmt_ioctl(fd - __REM_BIAS, req, arg) : ioctl(fd, req, arg))
      |                                               ^~~~~~~~~~~
tapeio.c:635:32: note: in expansion of macro 'rmtioctl'
  635 |         (is_regfile(dv)) ? 0 : rmtioctl(dv, MTIOCTOP, (char *) &m);
      |                                ^~~~~~~~
rmt.h:97:5: note: declared here
   97 | int __rmt_ioctl ();
      |     ^~~~~~~~~~~
tapeio.c: In function 'tape_tell':
rmt.h:78:47: error: too many arguments to function '__rmt_lseek'; expected 0, have 3
   78 | #define rmtlseek(fd, off, wh)   (_isrmt(fd) ? __rmt_lseek(fd - __REM_BIAS, off, wh) : lseek(fd, off, wh))
      |                                               ^~~~~~~~~~~
tapeio.c:647:16: note: in expansion of macro 'rmtlseek'
  647 |         *pos = rmtlseek(dv, 0, SEEK_CUR) / block_size;
      |                ^~~~~~~~
rmt.h:96:6: note: declared here
   96 | long __rmt_lseek ();
      |      ^~~~~~~~~~~
rmt.h:81:47: error: too many arguments to function '__rmt_ioctl'; expected 0, have 3
   81 | #define rmtioctl(fd,req,arg)    (_isrmt(fd) ? __rmt_ioctl(fd - __REM_BIAS, req, arg) : ioctl(fd, req, arg))
      |                                               ^~~~~~~~~~~
tapeio.c:649:15: note: in expansion of macro 'rmtioctl'
  649 |         err = rmtioctl(dv, MTIOCPOS, &m);
      |               ^~~~~~~~
rmt.h:97:5: note: declared here
   97 | int __rmt_ioctl ();
      |     ^~~~~~~~~~~
tapeio.c: In function 'tape_get_blk_size':
rmt.h:81:47: error: too many arguments to function '__rmt_ioctl'; expected 0, have 3
   81 | #define rmtioctl(fd,req,arg)    (_isrmt(fd) ? __rmt_ioctl(fd - __REM_BIAS, req, arg) : ioctl(fd, req, arg))
      |                                               ^~~~~~~~~~~
tapeio.c:669:15: note: in expansion of macro 'rmtioctl'
  669 |         err = rmtioctl(x, MTIOC_ZFTAPE_GETBLKSZ, (char *) &m);
      |               ^~~~~~~~
rmt.h:97:5: note: declared here
   97 | int __rmt_ioctl ();
      |     ^~~~~~~~~~~
rmt.h:81:47: error: too many arguments to function '__rmt_ioctl'; expected 0, have 3
   81 | #define rmtioctl(fd,req,arg)    (_isrmt(fd) ? __rmt_ioctl(fd - __REM_BIAS, req, arg) : ioctl(fd, req, arg))
      |                                               ^~~~~~~~~~~
tapeio.c:688:15: note: in expansion of macro 'rmtioctl'
  688 |         err = rmtioctl(x, MTIOCGET, &status);
      |               ^~~~~~~~
rmt.h:97:5: note: declared here
   97 | int __rmt_ioctl ();
      |     ^~~~~~~~~~~
tapeio.c: In function 'tape_erase':
rmt.h:81:47: error: too many arguments to function '__rmt_ioctl'; expected 0, have 3
   81 | #define rmtioctl(fd,req,arg)    (_isrmt(fd) ? __rmt_ioctl(fd - __REM_BIAS, req, arg) : ioctl(fd, req, arg))
      |                                               ^~~~~~~~~~~
tapeio.c:724:34: note: in expansion of macro 'rmtioctl'
  724 |     err = (is_regfile(dv)) ? 0 : rmtioctl(dv, MTIOCTOP, (char *) &m);
      |                                  ^~~~~~~~
rmt.h:97:5: note: declared here
   97 | int __rmt_ioctl ();
      |     ^~~~~~~~~~~
tapeio.c: In function 'ntape_open':
tapeio.c:759:18: warning: pointer targets in passing argument 1 of 'strchr' differ in signedness [-Wpointer-sign]
  759 |     dv = rmtopen(ntape, mode, S_IRWXU);
      |                  ^~~~~
      |                  |
      |                  signed char *
rmt.h:67:62: note: in definition of macro '_remdev'
   67 | #define _remdev(path)   (!f_force_local && (__rmt_path=index(path, ':')))
      |                                                              ^~~~
tapeio.c:759:10: note: in expansion of macro 'rmtopen'
  759 |     dv = rmtopen(ntape, mode, S_IRWXU);
      |          ^~~~~~~
/usr/include/string.h:246:34: note: expected 'const char *' but argument is of type 'signed char *'
  246 | extern char *strchr (const char *__s, int __c)
      |                      ~~~~~~~~~~~~^~~
rmt.h:70:51: error: too many arguments to function '__rmt_open'; expected 0, have 4
   70 | #define rmtopen(path,oflag,mode) (_remdev(path) ? __rmt_open(path, oflag, mode, __REM_BIAS) : open(path, oflag, mode))
      |                                                   ^~~~~~~~~~
tapeio.c:759:10: note: in expansion of macro 'rmtopen'
  759 |     dv = rmtopen(ntape, mode, S_IRWXU);
      |          ^~~~~~~
rmt.h:92:5: note: declared here
   92 | int __rmt_open ();
      |     ^~~~~~~~~~
tapeio.c:759:18: warning: pointer targets in passing argument 1 of 'open' differ in signedness [-Wpointer-sign]
  759 |     dv = rmtopen(ntape, mode, S_IRWXU);
      |                  ^~~~~
      |                  |
      |                  signed char *
rmt.h:70:100: note: in definition of macro 'rmtopen'
   70 | #define rmtopen(path,oflag,mode) (_remdev(path) ? __rmt_open(path, oflag, mode, __REM_BIAS) : open(path, oflag, mode))
      |                                                                                                    ^~~~
/usr/include/bits/fcntl2.h:43:19: note: expected 'const char *' but argument is of type 'signed char *'
   43 | open (const char *__path, int __oflag, ...)
      |       ~~~~~~~~~~~~^~~~~~
tapeio.c: In function 'tape_open_engine':
tapeio.c:779:22: warning: pointer targets in passing argument 1 of 'strchr' differ in signedness [-Wpointer-sign]
  779 |         dv = rmtopen(tape, mode, S_IRWXU);
      |                      ^~~~
      |                      |
      |                      signed char *
rmt.h:67:62: note: in definition of macro '_remdev'
   67 | #define _remdev(path)   (!f_force_local && (__rmt_path=index(path, ':')))
      |                                                              ^~~~
tapeio.c:779:14: note: in expansion of macro 'rmtopen'
  779 |         dv = rmtopen(tape, mode, S_IRWXU);
      |              ^~~~~~~
/usr/include/string.h:246:34: note: expected 'const char *' but argument is of type 'signed char *'
  246 | extern char *strchr (const char *__s, int __c)
      |                      ~~~~~~~~~~~~^~~
rmt.h:70:51: error: too many arguments to function '__rmt_open'; expected 0, have 4
   70 | #define rmtopen(path,oflag,mode) (_remdev(path) ? __rmt_open(path, oflag, mode, __REM_BIAS) : open(path, oflag, mode))
      |                                                   ^~~~~~~~~~
tapeio.c:779:14: note: in expansion of macro 'rmtopen'
  779 |         dv = rmtopen(tape, mode, S_IRWXU);
      |              ^~~~~~~
rmt.h:92:5: note: declared here
   92 | int __rmt_open ();
      |     ^~~~~~~~~~
tapeio.c:779:22: warning: pointer targets in passing argument 1 of 'open' differ in signedness [-Wpointer-sign]
  779 |         dv = rmtopen(tape, mode, S_IRWXU);
      |                      ^~~~
      |                      |
      |                      signed char *
rmt.h:70:100: note: in definition of macro 'rmtopen'
   70 | #define rmtopen(path,oflag,mode) (_remdev(path) ? __rmt_open(path, oflag, mode, __REM_BIAS) : open(path, oflag, mode))
      |                                                                                                    ^~~~
/usr/include/bits/fcntl2.h:43:19: note: expected 'const char *' but argument is of type 'signed char *'
   43 | open (const char *__path, int __oflag, ...)
      |       ~~~~~~~~~~~~^~~~~~
tapeio.c: In function 'tape_close_engine':
rmt.h:79:47: error: too many arguments to function '__rmt_close'; expected 0, have 1
   79 | #define rmtclose(fd)            (_isrmt(fd) ? __rmt_close(fd - __REM_BIAS) : close(fd))
      |                                               ^~~~~~~~~~~
tapeio.c:826:18: note: in expansion of macro 'rmtclose'
  826 |     ret = (dv) ? rmtclose(dv) : 0;
      |                  ^~~~~~~~
rmt.h:93:5: note: declared here
   93 | int __rmt_close ();
      |     ^~~~~~~~~~~
tapeio.c: In function 'read_from_buf':
tapeio.c:847:39: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'ssize_t' {aka 'long int'} [-Wformat=]
  847 |         sprintf(s, "Read request for %u bytes", count);
      |                                      ~^         ~~~~~
      |                                       |         |
      |                                       |         ssize_t {aka long int}
      |                                       unsigned int
      |                                      %lu
tapeio.c: In function 'do_write_block':
tapeio.c:1036:47: warning: format '%d' expects argument of type 'int', but argument 3 has type 'ssize_t' {aka 'long int'} [-Wformat=]
 1036 |             sprintf(s, "Wrote block to tape [%d bytes]", c);
      |                                              ~^          ~
      |                                               |          |
      |                                               int        ssize_t {aka long int}
      |                                              %ld
tapeio.c:1050:68: warning: format '%d' expects argument of type 'int', but argument 5 has type 'ssize_t' {aka 'long int'} [-Wformat=]
 1050 |             sprintf(s, "W: Error %d doing writing. dv = %d. Wrote %d bytes", errno, dv, -c);
      |                                                                   ~^                    ~~
      |                                                                    |                    |
      |                                                                    int                  ssize_t {aka long int}
      |                                                                   %ld
tapeio.c: In function 'child_term':
rmt.h:79:47: error: too many arguments to function '__rmt_close'; expected 0, have 1
   79 | #define rmtclose(fd)            (_isrmt(fd) ? __rmt_close(fd - __REM_BIAS) : close(fd))
      |                                               ^~~~~~~~~~~
tapeio.c:1196:13: note: in expansion of macro 'rmtclose'
 1196 |     if (dv) rmtclose(dv);
      |             ^~~~~~~~
rmt.h:93:5: note: declared here
   93 | int __rmt_close ();
      |     ^~~~~~~~~~~
tapeio.c: In function 'do_write_child':
tapeio.c:1261:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 1261 |         write_buf_no = (_vptr) (_s32) ret;       /* write buf_no are zero */
      |                        ^
tapeio.c: In function 'flush_buffers':
tapeio.c:1450:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 1450 |                  (_vptr) (_s32) do_write_block(w_current_buffer, w_cur_pos, (w_cur_pos != DOUBLE_BUFFER_SIZE));
      |                  ^
tapeio.c: In function 'check_tape':
tapeio.c:499:9: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  499 |         write(mf, l, strlen(l));
      |         ^~~~~~~~~~~~~~~~~~~~~~~
tapeio.c: In function 'do_next_tape':
tapeio.c:1102:21: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
 1102 |             if (mf) write(mf, "ERROR: End of tape reached - backup aborted\n",
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1103 |                           strlen("ERROR: End of tape reached - backup aborted\n"));
      |                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tapeio.c: In function 'do_write_child':
tapeio.c:1248:9: warning: ignoring return value of 'fgets' declared with attribute 'warn_unused_result' [-Wunused-result]
 1248 |         fgets(s, sizeof(s), fd_pipetoc);         /* wait until data ready */
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tapeio.c: In function 'wait_finish_writing':
tapeio.c:1296:9: warning: ignoring return value of 'fgets' declared with attribute 'warn_unused_result' [-Wunused-result]
 1296 |         fgets(s, sizeof(s), fd_pipefc);          /* wait until child ready */
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:82: tapeio.o] Error 1
gcc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -O3 -fno-strength-reduce -Wall -DLINUX -D_GNU_SOURCE -Dlint	 -DTRIPLE_BUFFER               -D__USE_FILE_OFFSET64  -DGLIBC_2 -DBSD_SIGNALS -I/usr/include/ncurses -o bg_vars.o -c bg_vars.c
gcc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -O3 -fno-strength-reduce -Wall -DLINUX -D_GNU_SOURCE -Dlint	 -DTRIPLE_BUFFER               -D__USE_FILE_OFFSET64  -DGLIBC_2 -DBSD_SIGNALS -I/usr/include/ncurses -o common.o -c common.c
common.c: In function 'do_read_vol_dir':
common.c:673:9: error: too many arguments to function 'read_volume_info'; expected 0, have 1
  673 |     if (read_volume_info(fd) == -1) goto err;    /* read in the stuff */
      |         ^~~~~~~~~~~~~~~~ ~~
In file included from taper.h:50,
                 from common.c:15:
common.h:92:17: note: declared here
   92 | extern _errstat read_volume_info();
      |                 ^~~~~~~~~~~~~~~~
common.c: In function 'check_device_names':
common.c:718:16: warning: pointer targets in passing argument 1 of 'strchr' differ in signedness [-Wpointer-sign]
  718 |     if (strchr(ntape, ':') == NULL)              /* don't prefix if using */
      |                ^~~~~
      |                |
      |                signed char *
In file included from taper.h:18:
/usr/include/string.h:246:34: note: expected 'const char *' but argument is of type 'signed char *'
  246 | extern char *strchr (const char *__s, int __c)
      |                      ~~~~~~~~~~~~^~~
common.c:721:20: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
  721 |             strcpy(ntape, s);
      |                    ^~~~~
      |                    |
      |                    signed char *
In file included from /usr/include/features.h:524,
                 from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdlib.h:26,
                 from taper.h:14:
/usr/include/bits/string_fortified.h:77:16: note: expected 'char *' but argument is of type 'signed char *'
   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
common.c:723:16: warning: pointer targets in passing argument 1 of 'strchr' differ in signedness [-Wpointer-sign]
  723 |     if (strchr(tape, ':') == NULL)               /* don't prefix if using */
      |                ^~~~
      |                |
      |                signed char *
/usr/include/string.h:246:34: note: expected 'const char *' but argument is of type 'signed char *'
  246 | extern char *strchr (const char *__s, int __c)
      |                      ~~~~~~~~~~~~^~~
common.c:726:20: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
  726 |             strcpy(tape, s);
      |                    ^~~~
      |                    |
      |                    signed char *
/usr/include/bits/string_fortified.h:77:16: note: expected 'char *' but argument is of type 'signed char *'
   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
common.c: In function 'process_dir':
common.c:1480:33: warning: pointer targets in passing argument 2 of 'strcmp' differ in signedness [-Wpointer-sign]
 1480 |                 if (!strcmp(s1, tape) || !strcmp(s1, ntape))/* don't backup backup device */
      |                                 ^~~~
      |                                 |
      |                                 signed char *
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'signed char *'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
common.c:1480:54: warning: pointer targets in passing argument 2 of 'strcmp' differ in signedness [-Wpointer-sign]
 1480 |                 if (!strcmp(s1, tape) || !strcmp(s1, ntape))/* don't backup backup device */
      |                                                      ^~~~~
      |                                                      |
      |                                                      signed char *
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'signed char *'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
common.c: In function 'open_uncompress_file':
common.c:2175:26: warning: pointer targets in passing argument 1 of 'little2machs32' differ in signedness [-Wpointer-sign]
 2175 |     id1 = little2machs32(&id);
      |                          ^~~
      |                          |
      |                          _u32 * {aka unsigned int *}
In file included from taper.h:52:
endianize.h:21:34: note: expected '_s32 *' {aka 'int *'} but argument is of type '_u32 *' {aka 'unsigned int *'}
   21 | extern _s32 little2machs32(_s32 *s);
      |                            ~~~~~~^
common.c: In function 'compress_file':
common.c:2226:26: warning: pointer targets in passing argument 1 of 'little2machs32' differ in signedness [-Wpointer-sign]
 2226 |     id1 = little2machs32(&id);
      |                          ^~~
      |                          |
      |                          _u32 * {aka unsigned int *}
endianize.h:21:34: note: expected '_s32 *' {aka 'int *'} but argument is of type '_u32 *' {aka 'unsigned int *'}
   21 | extern _s32 little2machs32(_s32 *s);
      |                            ~~~~~~^
common.c:2239:50: warning: pointer targets in passing argument 1 of 'mach2littles32' differ in signedness [-Wpointer-sign]
 2239 |     id = COMPRESSED_MAGIC;  id1 = mach2littles32(&id);
      |                                                  ^~~
      |                                                  |
      |                                                  _u32 * {aka unsigned int *}
endianize.h:20:34: note: expected '_s32 *' {aka 'int *'} but argument is of type '_u32 *' {aka 'unsigned int *'}
   20 | extern _s32 mach2littles32(_s32 *s);
      |                            ~~~~~~^
common.c: In function 'do_read_vol_dir':
common.c:639:5: warning: ignoring return value of 'read' declared with attribute 'warn_unused_result' [-Wunused-result]
  639 |     read(info_fd, (char *) &ifd1, sizeof(struct info_file_header));
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common.c: In function 'close_logfile':
common.c:827:17: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  827 |                 write(lf, "\n\n", strlen("\n\n"));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common.c:839:11: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  839 |           write(lf, "\n\n", strlen("\n\n"));
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common.c: In function 'process_dir':
common.c:1449:5: warning: ignoring return value of 'getcwd' declared with attribute 'warn_unused_result' [-Wunused-result]
 1449 |     getcwd(old_dir, sizeof(old_dir));            /* save old directory */
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common.c:1460:9: warning: ignoring return value of 'chdir' declared with attribute 'warn_unused_result' [-Wunused-result]
 1460 |         chdir(cur_dir);
      |         ^~~~~~~~~~~~~~
common.c:1532:5: warning: ignoring return value of 'chdir' declared with attribute 'warn_unused_result' [-Wunused-result]
 1532 |     chdir(old_dir);                              /* change back to old directory */
      |     ^~~~~~~~~~~~~~
common.c: In function 'open_one_index':
common.c:2320:13: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
 2320 |             write(info_index[recnum], 0, sizeof(_u32)); /* magic # for compression */
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:82: common.o] Error 1
gcc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -O3 -fno-strength-reduce -Wall -DLINUX -D_GNU_SOURCE -Dlint	 -DTRIPLE_BUFFER               -D__USE_FILE_OFFSET64  -DGLIBC_2 -DBSD_SIGNALS -I/usr/include/ncurses -o endianize.o -c endianize.c
endianize.c: In function 'mach2littlekey':
endianize.c:304:33: warning: pointer targets in passing argument 1 of 'mach2littleu32' differ in signedness [-Wpointer-sign]
  304 |     k1->volume = mach2littleu32(&k->volume);
      |                                 ^~~~~~~~~~
      |                                 |
      |                                 _s32 * {aka int *}
endianize.c:209:28: note: expected '_u32 *' {aka 'unsigned int *'} but argument is of type '_s32 *' {aka 'int *'}
  209 |  _u32 mach2littleu32(_u32 *s)
      |                      ~~~~~~^
endianize.c: In function 'little2machkey':
endianize.c:313:33: warning: pointer targets in passing argument 1 of 'little2machu32' differ in signedness [-Wpointer-sign]
  313 |     k1->volume = little2machu32(&k->volume);
      |                                 ^~~~~~~~~~
      |                                 |
      |                                 _s32 * {aka int *}
endianize.c:228:28: note: expected '_u32 *' {aka 'unsigned int *'} but argument is of type '_s32 *' {aka 'int *'}
  228 |  _u32 little2machu32(_u32 *s)
      |                      ~~~~~~^
endianize.c: In function 'ifk_node_endianize2little':
endianize.c:322:28: warning: pointer targets in passing argument 1 of 'mach2littleu32' differ in signedness [-Wpointer-sign]
  322 |     n1->n = mach2littleu32(&n->n);
      |                            ^~~~~
      |                            |
      |                            int *
endianize.c:209:28: note: expected '_u32 *' {aka 'unsigned int *'} but argument is of type 'int *'
  209 |  _u32 mach2littleu32(_u32 *s)
      |                      ~~~~~~^
endianize.c: In function 'ifk_node_endianize2mach':
endianize.c:334:28: warning: pointer targets in passing argument 1 of 'little2machu32' differ in signedness [-Wpointer-sign]
  334 |     n1->n = little2machu32(&n->n);
      |                            ^~~~~
      |                            |
      |                            int *
endianize.c:228:28: note: expected '_u32 *' {aka 'unsigned int *'} but argument is of type 'int *'
  228 |  _u32 little2machu32(_u32 *s)
      |                      ~~~~~~^
gcc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -O3 -fno-strength-reduce -Wall -DLINUX -D_GNU_SOURCE -Dlint	 -DTRIPLE_BUFFER               -D__USE_FILE_OFFSET64  -DGLIBC_2 -DBSD_SIGNALS -I/usr/include/ncurses -o mkinfo.o -c mkinfo.c
gcc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -O3 -fno-strength-reduce -Wall -DLINUX -D_GNU_SOURCE -Dlint	 -DTRIPLE_BUFFER               -D__USE_FILE_OFFSET64  -DGLIBC_2 -DBSD_SIGNALS -I/usr/include/ncurses -o common_bg.o -c common_bg.c
common_bg.c: In function 'mail_finish':
common_bg.c:29:5: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
   29 |     write(mf, s, strlen(s));
      |     ^~~~~~~~~~~~~~~~~~~~~~~
common_bg.c: In function 'sendmail':
common_bg.c:41:5: warning: ignoring return value of 'system' declared with attribute 'warn_unused_result' [-Wunused-result]
   41 |     system(s);
      |     ^~~~~~~~~
common_bg.c: In function 'do_exit':
common_bg.c:65:12: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
   65 |            write(lf, "\n\n", strlen("\n\n"));
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common_bg.c:72:9: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
   72 |         write(mf, err, strlen(err));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
common_bg.c:74:9: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
   74 |         write(mf, err, strlen(err));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
common_bg.c: In function 'write_log':
common_bg.c:154:5: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  154 |     write(lf, s2, strlen(s2));
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
common_bg.c: In function 'my_filecopy':
common_bg.c:347:9: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  347 |         write(newfd, tr_buffer, x);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
common_bg.c: In function 'sendmail':
common_bg.c:40:56: warning: '%s' directive writing up to 254 bytes into a region of size 214 [-Wformat-overflow=]
   40 |     sprintf(s, "%s %s -s \"Taper Unattended Backup\" < %s", MAIL_PROG, MAIL_TO, mailfn);   /* send mail */
      |                                                        ^~                       ~~~~~~
In file included from /usr/include/stdio.h:970,
                 from taper.h:21,
                 from common_bg.c:18:
In function 'sprintf',
    inlined from 'sendmail' at common_bg.c:40:5:
/usr/include/bits/stdio2.h:30:10: note: '__builtin___sprintf_chk' output between 42 and 296 bytes into a destination of size 255
   30 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   31 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   32 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
gcc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -O3 -fno-strength-reduce -Wall -DLINUX -D_GNU_SOURCE -Dlint	 -DTRIPLE_BUFFER               -D__USE_FILE_OFFSET64  -DGLIBC_2 -DBSD_SIGNALS -I/usr/include/ncurses -o sel_restore.o -c sel_restore.c
sel_restore.c: In function 'restore_update_selected_sizes':
sel_restore.c:104:44: warning: pointer targets in passing argument 4 of 'ntraverse' differ in signedness [-Wpointer-sign]
  104 |             x = ntraverse(0, &i_key, NULL, &rec, TRAVERSE_SEARCH, INFO_NAME);
      |                                            ^~~~
      |                                            |
      |                                            _s32 * {aka int *}
In file included from taper.h:50,
                 from sel_restore.c:14:
common.h:119:26: note: expected 'dskblk *' {aka 'unsigned int *'} but argument is of type '_s32 *' {aka 'int *'}
  119 |                  dskblk *rec, char command, int index); /* Traverse the tree */
      |                  ~~~~~~~~^~~
sel_restore.c:122:48: warning: pointer targets in passing argument 4 of 'ntraverse' differ in signedness [-Wpointer-sign]
  122 |                 x = ntraverse(0, &i_key, NULL, &rec, TRAVERSE_CONTINUE, INFO_NAME);
      |                                                ^~~~
      |                                                |
      |                                                _s32 * {aka int *}
common.h:119:26: note: expected 'dskblk *' {aka 'unsigned int *'} but argument is of type '_s32 *' {aka 'int *'}
  119 |                  dskblk *rec, char command, int index); /* Traverse the tree */
      |                  ~~~~~~~~^~~
sel_restore.c: In function 'restore_print_voldir_line':
sel_restore.c:180:15: warning: variable 't' set but not used [-Wunused-but-set-variable]
  180 |     struct tm t;
      |               ^
sel_restore.c: In function 'restore_print_selected_line':
sel_restore.c:272:58: warning: format '%d' expects argument of type 'int', but argument 5 has type '_u64' {aka 'long long unsigned int'} [-Wformat=]
  272 |     (mr->selected == 1) ?  mvwprintw(win, line+1, 5, " %8d   %s ",
      |                                                        ~~^
      |                                                          |
      |                                                          int
      |                                                        %8lld
  273 |                                      (mr->incremental == 1) ? mr->mm_size : mr->ab_size,
      |                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                           |
      |                                                                           _u64 {aka long long unsigned int}
sel_restore.c:275:58: warning: format '%d' expects argument of type 'int', but argument 5 has type '_u64' {aka 'long long unsigned int'} [-Wformat=]
  275 |                            mvwprintw(win, line+1, 5, "(%8d   %s)",
      |                                                        ~~^
      |                                                          |
      |                                                          int
      |                                                        %8lld
  276 |                                      (mr->incremental == 1) ? mr->mm_size : mr->ab_size,
      |                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                           |
      |                                                                           _u64 {aka long long unsigned int}
sel_restore.c: In function 'make_mydir':
sel_restore.c:525:36: warning: pointer targets in passing argument 4 of 'ntraverse' differ in signedness [-Wpointer-sign]
  525 |     if (ntraverse(0, &i_key, NULL, &c, TRAVERSE_SEARCH, INFO_NAME) == 2) return;
      |                                    ^~
      |                                    |
      |                                    _s32 * {aka int *}
common.h:119:26: note: expected 'dskblk *' {aka 'unsigned int *'} but argument is of type '_s32 *' {aka 'int *'}
  119 |                  dskblk *rec, char command, int index); /* Traverse the tree */
      |                  ~~~~~~~~^~~
sel_restore.c:559:40: warning: pointer targets in passing argument 4 of 'ntraverse' differ in signedness [-Wpointer-sign]
  559 |         if (ntraverse(0, &i_key, NULL, &c, TRAVERSE_CONTINUE, INFO_NAME) != 0) break;
      |                                        ^~
      |                                        |
      |                                        _s32 * {aka int *}
common.h:119:26: note: expected 'dskblk *' {aka 'unsigned int *'} but argument is of type '_s32 *' {aka 'int *'}
  119 |                  dskblk *rec, char command, int index); /* Traverse the tree */
      |                  ~~~~~~~~^~~
sel_restore.c: In function 'select_restore_files':
sel_restore.c:701:56: warning: pointer targets in passing argument 4 of 'ntraverse' differ in signedness [-Wpointer-sign]
  701 |                         if (ntraverse(0, &i_key, NULL, &c, TRAVERSE_SEARCH, INFO_NAME))
      |                                                        ^~
      |                                                        |
      |                                                        _s32 * {aka int *}
common.h:119:26: note: expected 'dskblk *' {aka 'unsigned int *'} but argument is of type '_s32 *' {aka 'int *'}
  119 |                  dskblk *rec, char command, int index); /* Traverse the tree */
      |                  ~~~~~~~~^~~
sel_restore.c:705:64: warning: pointer targets in passing argument 4 of 'ntraverse' differ in signedness [-Wpointer-sign]
  705 |                                 x = ntraverse(0, &i_key, NULL, &c, TRAVERSE_CONTINUE,
      |                                                                ^~
      |                                                                |
      |                                                                _s32 * {aka int *}
common.h:119:26: note: expected 'dskblk *' {aka 'unsigned int *'} but argument is of type '_s32 *' {aka 'int *'}
  119 |                  dskblk *rec, char command, int index); /* Traverse the tree */
      |                  ~~~~~~~~^~~
sel_restore.c:713:68: warning: pointer targets in passing argument 4 of 'ntraverse' differ in signedness [-Wpointer-sign]
  713 |                                     x = ntraverse(0, &i_key, NULL, &c, TRAVERSE_TOP,
      |                                                                    ^~
      |                                                                    |
      |                                                                    _s32 * {aka int *}
common.h:119:26: note: expected 'dskblk *' {aka 'unsigned int *'} but argument is of type '_s32 *' {aka 'int *'}
  119 |                  dskblk *rec, char command, int index); /* Traverse the tree */
      |                  ~~~~~~~~^~~
sel_restore.c:752:46: warning: pointer targets in passing argument 5 of 'adjust_cur_entry' differ in signedness [-Wpointer-sign]
  752 |                                              &in_dir, c+1);
      |                                              ^~~~~~~
      |                                              |
      |                                              _s32 * {aka int *}
In file included from taper.h:43:
select_box.h:83:29: note: expected '_u32 *' {aka 'unsigned int *'} but argument is of type '_s32 *' {aka 'int *'}
   83 |                       _u32 *no_entries, _s32 cur_entry);
      |                       ~~~~~~^~~~~~~~~~
sel_restore.c:758:38: warning: pointer targets in passing argument 5 of 'adjust_cur_entry' differ in signedness [-Wpointer-sign]
  758 |                                      &in_dir, c+1);
      |                                      ^~~~~~~
      |                                      |
      |                                      _s32 * {aka int *}
select_box.h:83:29: note: expected '_u32 *' {aka 'unsigned int *'} but argument is of type '_s32 *' {aka 'int *'}
   83 |                       _u32 *no_entries, _s32 cur_entry);
      |                       ~~~~~~^~~~~~~~~~
sel_restore.c:862:48: warning: pointer targets in passing argument 4 of 'ntraverse' differ in signedness [-Wpointer-sign]
  862 |                 if (ntraverse(0, &i_key, NULL, &c, TRAVERSE_SEARCH, INFO_NAME))
      |                                                ^~
      |                                                |
      |                                                _s32 * {aka int *}
common.h:119:26: note: expected 'dskblk *' {aka 'unsigned int *'} but argument is of type '_s32 *' {aka 'int *'}
  119 |                  dskblk *rec, char command, int index); /* Traverse the tree */
      |                  ~~~~~~~~^~~
sel_restore.c: In function 'restore_restore_backupset':
sel_restore.c:577:9: warning: ignoring return value of 'fgets' declared with attribute 'warn_unused_result' [-Wunused-result]
  577 |         fgets(ln, sizeof(ln), f);                /* get name */
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
sel_restore.c:593:9: warning: ignoring return value of 'fgets' declared with attribute 'warn_unused_result' [-Wunused-result]
  593 |         fgets(ln, sizeof(ln), f);                /* ignore filter */
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
sel_restore.c: In function 'restore_print_voldir_line':
sel_restore.c:208:26: warning: '%d' directive writing between 1 and 10 bytes into a region of size between 0 and 255 [-Wformat-overflow=]
  208 |           sprintf(s, "%s %d %5s %12s", s, abs(fe->i.f.volume), "-", s2);
      |                          ^~
sel_restore.c:208:22: note: directive argument in the range [0, 2147483647]
  208 |           sprintf(s, "%s %d %5s %12s", s, abs(fe->i.f.volume), "-", s2);
      |                      ^~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:970,
                 from taper.h:21:
In function 'sprintf',
    inlined from 'restore_print_voldir_line' at sel_restore.c:208:4:
/usr/include/bits/stdio2.h:30:10: note: '__builtin___sprintf_chk' output 22 or more bytes (assuming 286) into a destination of size 256
   30 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   31 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   32 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
/usr/include/bits/stdio2.h:30:10: warning: '__builtin___sprintf_chk' argument 5 overlaps destination object 's' [-Wrestrict]
sel_restore.c: In function 'restore_print_voldir_line':
sel_restore.c:178:12: note: destination object referenced by 'restrict'-qualified argument 1 was declared here
  178 |     char   s[NAME_MAX+1], s2[50], s3[MAX_FNAME];
      |            ^
sel_restore.c:206:26: warning: '%d' directive writing between 1 and 10 bytes into a region of size between 0 and 255 [-Wformat-overflow=]
  206 |           sprintf(s, "%s %d %5qd %12s", s, abs(fe->i.f.volume), fe->i.f.pos_in_archive, s2);
      |                          ^~
sel_restore.c:206:22: note: directive argument in the range [0, 2147483647]
  206 |           sprintf(s, "%s %d %5qd %12s", s, abs(fe->i.f.volume), fe->i.f.pos_in_archive, s2);
      |                      ^~~~~~~~~~~~~~~~~
sel_restore.c: In function 'restore_print_vol_dir':
sel_restore.c:232:35: warning: 's' is used uninitialized [-Wuninitialized]
  232 |     if (strlen(s1) > getmaxx(win)-strlen(s)-2) { /* make sure dir name not too long */
      |                                   ^~~~~~~~~
In file included from taper.h:18:
/usr/include/string.h:407:15: note: by argument 1 of type 'const char *' to 'strlen' declared here
  407 | extern size_t strlen (const char *__s)
      |               ^~~~~~
sel_restore.c:225:12: note: 's' declared here
  225 |     char   s[50], s1[MAX_FNAME], s2[MAX_FNAME];
      |            ^
gcc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -O3 -fno-strength-reduce -Wall -DLINUX -D_GNU_SOURCE -Dlint	 -DTRIPLE_BUFFER               -D__USE_FILE_OFFSET64  -DGLIBC_2 -DBSD_SIGNALS -I/usr/include/ncurses -o sel_backup.o -c sel_backup.c
sel_backup.c: In function 'backup_del_cur_selected_entry_engine':
sel_backup.c:744:12: warning: variable 'mode' set but not used [-Wunused-but-set-variable]
  744 |     mode_t mode;
      |            ^~~~
sel_backup.c: In function 'backup_del_cur_exclude_entry_engine':
sel_backup.c:766:12: warning: variable 'mode' set but not used [-Wunused-but-set-variable]
  766 |     mode_t mode;
      |            ^~~~
sel_backup.c: In function 'backup_select_files':
sel_backup.c:1004:80: warning: pointer targets in passing argument 5 of 'adjust_cur_entry' differ in signedness [-Wpointer-sign]
 1004 |                         adjust_cur_entry(files, &dir_sd, backup_print_dir, &p, &directory_count, c);
      |                                                                                ^~~~~~~~~~~~~~~~
      |                                                                                |
      |                                                                                _s32 * {aka int *}
In file included from taper.h:43,
                 from sel_backup.c:14:
select_box.h:83:29: note: expected '_u32 *' {aka 'unsigned int *'} but argument is of type '_s32 *' {aka 'int *'}
   83 |                       _u32 *no_entries, _s32 cur_entry);
      |                       ~~~~~~^~~~~~~~~~
sel_backup.c:1016:88: warning: pointer targets in passing argument 5 of 'adjust_cur_entry' differ in signedness [-Wpointer-sign]
 1016 |                                 adjust_cur_entry(files, &dir_sd, backup_print_dir, &p, &directory_count, c);
      |                                                                                        ^~~~~~~~~~~~~~~~
      |                                                                                        |
      |                                                                                        _s32 * {aka int *}
select_box.h:83:29: note: expected '_u32 *' {aka 'unsigned int *'} but argument is of type '_s32 *' {aka 'int *'}
   83 |                       _u32 *no_entries, _s32 cur_entry);
      |                       ~~~~~~^~~~~~~~~~
sel_backup.c:1115:25: warning: the address of 'old_dir' will always evaluate as 'true' [-Waddress]
 1115 |                     if (old_dir)
      |                         ^~~~~~~
sel_backup.c: In function 'backup_restore_backupset':
sel_backup.c:802:5: warning: ignoring return value of 'getcwd' declared with attribute 'warn_unused_result' [-Wunused-result]
  802 |     getcwd(x, sizeof(x));
      |     ^~~~~~~~~~~~~~~~~~~~
sel_backup.c:806:5: warning: ignoring return value of 'chdir' declared with attribute 'warn_unused_result' [-Wunused-result]
  806 |     chdir(x);
      |     ^~~~~~~~
sel_backup.c: In function 'backup_select_files':
sel_backup.c:1112:19: warning: ignoring return value of 'getcwd' declared with attribute 'warn_unused_result' [-Wunused-result]
 1112 |                   getcwd(cur_dir, MAX_FNAME);
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
sel_backup.c:1138:41: warning: ignoring return value of 'getcwd' declared with attribute 'warn_unused_result' [-Wunused-result]
 1138 |                                         getcwd(cur_dir, MAX_FNAME);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -O3 -fno-strength-reduce -Wall -DLINUX -D_GNU_SOURCE -Dlint	 -DTRIPLE_BUFFER               -D__USE_FILE_OFFSET64  -DGLIBC_2 -DBSD_SIGNALS -I/usr/include/ncurses -o mtree.o -c mtree.c
mtree.c: In function 'ndeleteb':
mtree.c:455:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  455 |         if (pblk.a[0] == 0)
      |         ^~
mtree.c:457:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  457 |                 t = pblk.a[0];
      |                 ^
gcc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -O3 -fno-strength-reduce -Wall -DLINUX -D_GNU_SOURCE -Dlint	 -DTRIPLE_BUFFER               -D__USE_FILE_OFFSET64  -DGLIBC_2 -DBSD_SIGNALS -I/usr/include/ncurses -o select_box.o -c select_box.c
select_box.c: In function 'select_box':
select_box.c:780:43: warning: pointer targets in passing argument 5 of 'adjust_sd' differ in signedness [-Wpointer-sign]
  780 |         adjust_sd(win, sd, ps, &p_scroll, no_entries);
      |                                           ^~~~~~~~~~
      |                                           |
      |                                           _s32 * {aka int *}
select_box.c:511:88: note: expected '_u32 *' {aka 'unsigned int *'} but argument is of type '_s32 *' {aka 'int *'}
  511 | void adjust_sd(WINDOW *win, select_details *sd, print_screen ps, char *p_scroll, _u32 *no_entries)
      |                                                                                  ~~~~~~^~~~~~~~~~
select_box.c: In function 'select_menu':
select_box.c:807:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  807 |   for  (c=0; c<=no_items; c++)
      |   ^~~
select_box.c:810:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  810 |     cur_line = *in_op;
      |     ^~~~~~~~
select_box.c: In function 'select_file':
select_box.c:1191:25: warning: the address of 'old_dir' will always evaluate as 'true' [-Waddress]
 1191 |                     if (old_dir)
      |                         ^~~~~~~
select_box.c: In function 'read_dir':
select_box.c:914:5: warning: ignoring return value of 'chdir' declared with attribute 'warn_unused_result' [-Wunused-result]
  914 |     chdir(dir_name);
      |     ^~~~~~~~~~~~~~~
select_box.c:915:5: warning: ignoring return value of 'getcwd' declared with attribute 'warn_unused_result' [-Wunused-result]
  915 |     getcwd(dir_name, MAX_FNAME);                 /* real name */
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
select_box.c: In function 'select_file':
select_box.c:1132:5: warning: ignoring return value of 'getcwd' declared with attribute 'warn_unused_result' [-Wunused-result]
 1132 |     getcwd(cur_dir, sizeof(cur_dir));            /* preserve existing dir */
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
select_box.c:1166:13: warning: ignoring return value of 'chdir' declared with attribute 'warn_unused_result' [-Wunused-result]
 1166 |             chdir(cur_dir);
      |             ^~~~~~~~~~~~~~
select_box.c:1171:13: warning: ignoring return value of 'chdir' declared with attribute 'warn_unused_result' [-Wunused-result]
 1171 |             chdir(cur_dir);
      |             ^~~~~~~~~~~~~~
select_box.c:1184:25: warning: ignoring return value of 'chdir' declared with attribute 'warn_unused_result' [-Wunused-result]
 1184 |                         chdir(cur_dir);
      |                         ^~~~~~~~~~~~~~
select_box.c:1188:23: warning: ignoring return value of 'getcwd' declared with attribute 'warn_unused_result' [-Wunused-result]
 1188 |                       getcwd(dir_cur_dir, MAX_FNAME);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
select_box.c:1203:17: warning: ignoring return value of 'chdir' declared with attribute 'warn_unused_result' [-Wunused-result]
 1203 |                 chdir(cur_dir);
      |                 ^~~~~~~~~~~~~~
select_box.c: In function 'print_dir_line':
select_box.c:1001:20: warning: '%s' directive writing up to 254 bytes into a region of size between 0 and 255 [-Wformat-overflow=]
 1001 |     sprintf(s, "%s %s %12s", s, s3, s2);
      |                    ^~           ~~
In file included from /usr/include/stdio.h:970,
                 from select_box.h:13,
                 from select_box.c:15:
In function 'sprintf',
    inlined from 'print_dir_line' at select_box.c:1001:5:
/usr/include/bits/stdio2.h:30:10: note: '__builtin___sprintf_chk' output 15 or more bytes (assuming 524) into a destination of size 256
   30 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   31 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   32 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
/usr/include/bits/stdio2.h:30:10: warning: '__builtin___sprintf_chk' argument 5 overlaps destination object 's' [-Wrestrict]
select_box.c: In function 'print_dir_line':
select_box.c:984:16: note: destination object referenced by 'restrict'-qualified argument 1 was declared here
  984 |     char       s[NAME_MAX+1], s2[MAX_FNAME], s3[MAX_FNAME];
      |                ^
gcc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -O3 -fno-strength-reduce -Wall -DLINUX -D_GNU_SOURCE -Dlint	 -DTRIPLE_BUFFER               -D__USE_FILE_OFFSET64  -DGLIBC_2 -DBSD_SIGNALS -I/usr/include/ncurses -o taper.o -c taper.c
taper.c: In function 'read_environment':
taper.c:158:14: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
  158 |       strcpy(tape, getenv(TAPE_ENVIRON));
      |              ^~~~
      |              |
      |              signed char *
In file included from /usr/include/features.h:524,
                 from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdlib.h:26,
                 from taper.h:14,
                 from taper.c:22:
/usr/include/bits/string_fortified.h:77:16: note: expected 'char *' but argument is of type 'signed char *'
   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
taper.c:161:14: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
  161 |       strcpy(ntape, getenv(NTAPE_ENVIRON));
      |              ^~~~~
      |              |
      |              signed char *
/usr/include/bits/string_fortified.h:77:16: note: expected 'char *' but argument is of type 'signed char *'
   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
taper.c: In function 'fill_in_defaults':
taper.c:562:33: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
  562 |         if (*tape == -1) strcpy(tape, FTAPE_DEFAULT_TAPE);
      |                                 ^~~~
      |                                 |
      |                                 signed char *
/usr/include/bits/string_fortified.h:77:16: note: expected 'char *' but argument is of type 'signed char *'
   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
taper.c:563:34: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
  563 |         if (*ntape == -1) strcpy(ntape, FTAPE_DEFAULT_NTAPE);
      |                                  ^~~~~
      |                                  |
      |                                  signed char *
/usr/include/bits/string_fortified.h:77:16: note: expected 'char *' but argument is of type 'signed char *'
   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
taper.c:576:33: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
  576 |         if (*tape == -1) strcpy(tape, ZFTAPE_DEFAULT_TAPE);
      |                                 ^~~~
      |                                 |
      |                                 signed char *
/usr/include/bits/string_fortified.h:77:16: note: expected 'char *' but argument is of type 'signed char *'
   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
taper.c:577:34: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
  577 |         if (*ntape == -1) strcpy(ntape, ZFTAPE_DEFAULT_NTAPE);
      |                                  ^~~~~
      |                                  |
      |                                  signed char *
/usr/include/bits/string_fortified.h:77:16: note: expected 'char *' but argument is of type 'signed char *'
   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
taper.c:590:33: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
  590 |         if (*tape == -1) strcpy(tape, SCSI_DEFAULT_TAPE);
      |                                 ^~~~
      |                                 |
      |                                 signed char *
/usr/include/bits/string_fortified.h:77:16: note: expected 'char *' but argument is of type 'signed char *'
   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
taper.c:591:34: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
  591 |         if (*ntape == -1) strcpy(ntape, SCSI_DEFAULT_NTAPE);
      |                                  ^~~~~
      |                                  |
      |                                  signed char *
/usr/include/bits/string_fortified.h:77:16: note: expected 'char *' but argument is of type 'signed char *'
   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
taper.c:604:33: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
  604 |         if (*tape == -1) strcpy(tape, "");
      |                                 ^~~~
      |                                 |
      |                                 signed char *
/usr/include/bits/string_fortified.h:77:16: note: expected 'char *' but argument is of type 'signed char *'
   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
taper.c:605:34: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
  605 |         if (*ntape == -1) strcpy(ntape, "");
      |                                  ^~~~~
      |                                  |
      |                                  signed char *
/usr/include/bits/string_fortified.h:77:16: note: expected 'char *' but argument is of type 'signed char *'
   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
taper.c:618:33: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
  618 |         if (*tape == -1) strcpy(tape, REMOVABLE_DEFAULT_TAPE);
      |                                 ^~~~
      |                                 |
      |                                 signed char *
/usr/include/bits/string_fortified.h:77:16: note: expected 'char *' but argument is of type 'signed char *'
   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
taper.c:619:34: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
  619 |         if (*ntape == -1) strcpy(ntape, REMOVABLE_DEFAULT_NTAPE);
      |                                  ^~~~~
      |                                  |
      |                                  signed char *
/usr/include/bits/string_fortified.h:77:16: note: expected 'char *' but argument is of type 'signed char *'
   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
taper.c:632:33: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
  632 |         if (*tape == -1) strcpy(tape, IDE_DEFAULT_TAPE);
      |                                 ^~~~
      |                                 |
      |                                 signed char *
/usr/include/bits/string_fortified.h:77:16: note: expected 'char *' but argument is of type 'signed char *'
   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
taper.c:633:34: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
  633 |         if (*ntape == -1) strcpy(ntape, IDE_DEFAULT_NTAPE);
      |                                  ^~~~~
      |                                  |
      |                                  signed char *
/usr/include/bits/string_fortified.h:77:16: note: expected 'char *' but argument is of type 'signed char *'
   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
taper.c: In function 'taper_change_prefs':
taper.c:1038:13: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
 1038 |             if (allab)
      |             ^~
taper.c:1040:15: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
 1040 |               centre(help,11, "Press any key...", COLOR_HELP);
      |               ^~~~~~
taper.c: In function 'main':
taper.c:1480:3: warning: ignoring return value of 'getcwd' declared with attribute 'warn_unused_result' [-Wunused-result]
 1480 |   getcwd(cur_dir, sizeof(cur_dir));              /* save current directory for backup */
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
taper.c:1481:3: warning: ignoring return value of 'getcwd' declared with attribute 'warn_unused_result' [-Wunused-result]
 1481 |   getcwd(original_cur_dir, sizeof(original_cur_dir)); /* for restore */
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
taper.c: In function 'taper_save_preference_file':
taper.c:1093:9: warning: ignoring return value of 'getcwd' declared with attribute 'warn_unused_result' [-Wunused-result]
 1093 |         getcwd(s, sizeof(s));
      |         ^~~~~~~~~~~~~~~~~~~~
taper.c: In function 'taper_save_command_line':
taper.c:1161:9: warning: ignoring return value of 'getcwd' declared with attribute 'warn_unused_result' [-Wunused-result]
 1161 |         getcwd(s, sizeof(s));
      |         ^~~~~~~~~~~~~~~~~~~~
make depend
make[1]: Entering directory '/home/pterjan/rpmbuild/BUILD/taper-7.0-build/taper-7.0pre-1'
gcc -M -I/usr/include/ncurses vars.c common.c endianize.c tapeio.c rtapelib.c sel_backup.c backup.c sel_restore.c restore.c utils.c mkinfo.c taper.c  bg_backup.c  \
     bg_restore.c  memory.c common_bg.c select_box.c bg_vars.c mtree.c library.c fifo.c > .depend
make -C compress depend
make[2]: Entering directory '/home/pterjan/rpmbuild/BUILD/taper-7.0-build/taper-7.0pre-1/compress'
gcc -M -I/usr/include/ncurses zip.c unzip.c bits.c trees.c deflate.c inflate.c util.c lzrw3.c  > .depend
make[2]: Leaving directory '/home/pterjan/rpmbuild/BUILD/taper-7.0-build/taper-7.0pre-1/compress'
make[1]: Leaving directory '/home/pterjan/rpmbuild/BUILD/taper-7.0-build/taper-7.0pre-1'
error: Bad exit status from /home/pterjan/rpmbuild/tmp/rpm-tmp.P2UhkQ (%build)

RPM build errors:
    Bad exit status from /home/pterjan/rpmbuild/tmp/rpm-tmp.P2UhkQ (%build)
I: [iurt_root_command] ERROR: chroot