Source: mac-fdisk
Version: 0.1-18
Severity: serious
Tags: ftbfs
Justification: fails to build from source

Hi!
I'm afraid that mac-fdisk fails to build with the toolchain in current
unstable.  It doesn't include public headers, which results in a lot
of warnings like:

pdisk.c:156:5: warning: implicit declaration of function ‘exit’ 
[-Wimplicit-function-declaration]
  156 |     exit(err);
      |     ^~~~
pdisk.c:52:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
pdisk.c:469:13: warning: implicit declaration of function ‘strncmp’ 
[-Wimplicit-function-declaration]
  469 |         if (strncmp(type_name, kFreeType, DPISTRLEN) == 0) {
      |             ^~~~~~~
pdisk.c:52:1: note: include ‘<string.h>’ or provide a declaration of ‘strncmp’
dpme.h:48:25: warning: ‘strncmp’ argument 3 type is ‘int’ where ‘unsigned int’ 
is expected in a call to built-in function declared without prototype 
[-Wbuiltin-declaration-mismatch]
dump.c:319:21: warning: incompatible implicit declaration of built-in function 
‘malloc’ [-Wbuiltin-declaration-mismatch]
  319 |     data = (DPME *) malloc(PBLOCK_SIZE);
      |                     ^~~~~~
dump.c:319:21: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’

and some fatal errors:

errors.c: In function ‘fatal’:
errors.c:118:30: error: ‘sys_nerr’ undeclared (first use in this function)
  118 |     if (value > 0 && value < sys_nerr) {
      |                              ^~~~~~~~
errors.c:118:30: note: each undeclared identifier is reported only once for 
each func
tion it appears in
errors.c:119:37: error: ‘sys_errlist’ undeclared (first use in this function)
  119 |         fprintf(stderr, "  (%s)\n", sys_errlist[value]);
      |                                     ^~~~~~~~~~~

Full log attached.


Meow!
-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), 
(120, 'experimental'), (1, 'experimental-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.18.0-00017-g251fbd8b0fa2 (SMP w/64 CPU threads)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
sbuild (Debian sbuild) 0.83.1 (26 April 2022) on valinor.angband.pl

+==============================================================================+
| mac-fdisk (i386)                             Tue, 24 May 2022 15:36:21 +0000 |
+==============================================================================+

Package: mac-fdisk
Distribution: unstable
Machine Architecture: amd64
Host Architecture: i386
Build Architecture: i386
Build Type: binary

I: NOTICE: Log filtering will replace 
'var/run/schroot/mount/unstable-i386-sbuild-c89c94f3-c7e0-4819-8956-a172ad00da2c'
 with '<<CHROOT>>'
I: NOTICE: Log filtering will replace 'build/mac-fdisk-SIbUU1/resolver-pC5EEC' 
with '<<RESOLVERDIR>>'

+------------------------------------------------------------------------------+
| Update chroot                                                                |
+------------------------------------------------------------------------------+

Hit:1 http://apt-rosy.angband.pl:3142/debian unstable InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

+------------------------------------------------------------------------------+
| Fetch source files                                                           |
+------------------------------------------------------------------------------+


Check APT
---------

Checking available source versions...

Download source files with APT
------------------------------

Reading package lists...
NOTICE: 'mac-fdisk' packaging is maintained in the 'Git' version control system 
at:
git://github.com/glaubitz/mac-fdisk-debian.git
Please use:
git clone git://github.com/glaubitz/mac-fdisk-debian.git
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 78.1 kB of source archives.
Get:1 http://apt-rosy.angband.pl:3142/debian unstable/main mac-fdisk 0.1-18 
(dsc) [2010 B]
Get:2 http://apt-rosy.angband.pl:3142/debian unstable/main mac-fdisk 0.1-18 
(tar) [55.8 kB]
Get:3 http://apt-rosy.angband.pl:3142/debian unstable/main mac-fdisk 0.1-18 
(diff) [20.3 kB]
Fetched 78.1 kB in 0s (299 kB/s)
Download complete and in download only mode
I: NOTICE: Log filtering will replace 'build/mac-fdisk-SIbUU1/mac-fdisk-0.1' 
with '<<PKGBUILDDIR>>'
I: NOTICE: Log filtering will replace 'build/mac-fdisk-SIbUU1' with 
'<<BUILDDIR>>'

+------------------------------------------------------------------------------+
| Install package build dependencies                                           |
+------------------------------------------------------------------------------+


Setup apt archive
-----------------

Merged Build-Depends: debhelper, build-essential, fakeroot
Filtered Build-Depends: debhelper, build-essential, fakeroot
dpkg-deb: building package 'sbuild-build-depends-main-dummy' in 
'/<<RESOLVERDIR>>/apt_archive/sbuild-build-depends-main-dummy.deb'.
Ign:1 copy:/<<RESOLVERDIR>>/apt_archive ./ InRelease
Get:2 copy:/<<RESOLVERDIR>>/apt_archive ./ Release [957 B]
Ign:3 copy:/<<RESOLVERDIR>>/apt_archive ./ Release.gpg
Get:4 copy:/<<RESOLVERDIR>>/apt_archive ./ Sources [358 B]
Get:5 copy:/<<RESOLVERDIR>>/apt_archive ./ Packages [438 B]
Fetched 1753 B in 0s (107 kB/s)
Reading package lists...
Reading package lists...

Install main build dependencies (apt-based resolver)
----------------------------------------------------

Installing build dependencies
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  sbuild-build-depends-main-dummy
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 864 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 copy:/<<RESOLVERDIR>>/apt_archive ./ sbuild-build-depends-main-dummy 
0.invalid.0 [864 B]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 864 B in 0s (0 B/s)
Selecting previously unselected package sbuild-build-depends-main-dummy.
(Reading database ... 14452 files and directories currently installed.)
Preparing to unpack .../sbuild-build-depends-main-dummy_0.invalid.0_i386.deb ...
Unpacking sbuild-build-depends-main-dummy (0.invalid.0) ...
Setting up sbuild-build-depends-main-dummy (0.invalid.0) ...

+------------------------------------------------------------------------------+
| Check architectures                                                          |
+------------------------------------------------------------------------------+

Arch check ok (i386 included in m68k powerpc ppc64 i386)

+------------------------------------------------------------------------------+
| Build environment                                                            |
+------------------------------------------------------------------------------+

Kernel: Linux 5.18.0-00017-g251fbd8b0fa2 #1 SMP Sun May 22 22:51:58 CEST 2022 
amd64 (x86_64)
Toolchain package versions: binutils_2.38-4 dpkg-dev_1.21.7 g++-11_11.3.0-3 
gcc-11_11.3.0-3 libc6-dev_2.33-7 libstdc++-11-dev_11.3.0-3 libstdc++6_12.1.0-2 
linux-libc-dev_5.17.6-1+b1
Package versions: adduser_3.121 apt_2.5.0 autoconf_2.71-2 automake_1:1.16.5-1.3 
autopoint_0.21-6 autotools-dev_20220109.1 base-files_12.2 base-passwd_3.5.52 
bash_5.1-6+b1 binutils_2.38-4 binutils-common_2.38-4 
binutils-i686-linux-gnu_2.38-4 bsdextrautils_2.38-4 bsdutils_1:2.38-4 
build-essential_12.9 bzip2_1.0.8-5 coreutils_8.32-4.1 cpp_4:11.2.0-2 
cpp-11_11.3.0-3 dash_0.5.11+git20210903+057cd650a4ed-8 debconf_1.5.79 
debhelper_13.7.1 debian-archive-keyring_2021.1.1 debianutils_5.7-0.2 
dh-autoreconf_20 dh-strip-nondeterminism_1.13.0-1 diffutils_1:3.7-5 dpkg_1.21.7 
dpkg-dev_1.21.7 dwz_0.14-1 e2fsprogs_1.46.5-2 eatmydata_130-2 fakeroot_1.29-1 
file_1:5.41-4 findutils_4.9.0-3 g++_4:11.2.0-2 g++-11_11.3.0-3 gcc_4:11.2.0-2 
gcc-10-base_10.3.0-15 gcc-11_11.3.0-3 gcc-11-base_11.3.0-3 gcc-12-base_12.1.0-2 
gcc-9-base_9.4.0-5 gettext_0.21-6 gettext-base_0.21-6 gpgv_2.2.35-2 grep_3.7-1 
groff-base_1.22.4-8 gzip_1.12-1 hostname_3.23 init-system-helpers_1.63 
intltool-debian_0.35.0+20060710.5 libacl1_2.3.1-1 libapt-pkg6.0_2.5.0 
libarchive-zip-perl_1.68-1 libasan6_11.3.0-3 libatomic1_12.1.0-2 
libattr1_1:2.5.1-1 libaudit-common_1:3.0.7-1 libaudit1_1:3.0.7-1+b1 
libbinutils_2.38-4 libblkid1_2.38-4 libbz2-1.0_1.0.8-5 libc-bin_2.33-7 
libc-dev-bin_2.33-7 libc6_2.33-7 libc6-dev_2.33-7 libcap-ng0_0.7.9-2.2+b2 
libcap2_1:2.44-1 libcc1-0_12.1.0-2 libcom-err2_1.46.5-2 
libcrypt-dev_1:4.4.27-1.1 libcrypt1_1:4.4.27-1.1 libctf-nobfd0_2.38-4 
libctf0_2.38-4 libdb5.3_5.3.28+dfsg1-0.9 libdebconfclient0_0.262 
libdebhelper-perl_13.7.1 libdpkg-perl_1.21.7 libeatmydata1_130-2 
libelf1_0.187-1 libext2fs2_1.46.5-2 libfakeroot_1.29-1 libffi8_3.4.2-4 
libfile-stripnondeterminism-perl_1.13.0-1 libgcc-11-dev_11.3.0-3 
libgcc-s1_12.1.0-2 libgcrypt20_1.10.1-2 libgdbm-compat4_1.23-1 libgdbm6_1.23-1 
libgmp10_2:6.2.1+dfsg-3 libgnutls30_3.7.4-2 libgomp1_12.1.0-2 
libgpg-error0_1.45-2 libgssapi-krb5-2_1.19.2-2+b2 libhogweed6_3.7.3-1 
libicu71_71.1-3 libidn2-0_2.3.2-2 libisl23_0.24-2 libitm1_12.1.0-2 
libk5crypto3_1.19.2-2+b2 libkeyutils1_1.6.1-3 libkrb5-3_1.19.2-2+b2 
libkrb5support0_1.19.2-2+b2 liblz4-1_1.9.3-2 liblzma5_5.2.5-2.1 
libmagic-mgc_1:5.41-4 libmagic1_1:5.41-4 libmount1_2.38-4 libmpc3_1.2.1-2 
libmpfr6_4.1.0-3 libnettle8_3.7.3-1 libnsl-dev_1.3.0-2 libnsl2_1.3.0-2 
libp11-kit0_0.24.1-1 libpam-modules_1.4.0-13 libpam-modules-bin_1.4.0-13 
libpam-runtime_1.4.0-13 libpam0g_1.4.0-13 libpcre2-8-0_10.40-1 
libpcre3_2:8.39-14 libperl5.34_5.34.0-4 libpipeline1_1.5.6-1 
libquadmath0_12.1.0-2 libseccomp2_2.5.4-1 libselinux1_3.3-1+b2 
libsemanage-common_3.3-1 libsemanage2_3.3-1+b2 libsepol2_3.3-1 
libsigsegv2_2.14-1 libsmartcols1_2.38-4 libss2_1.46.5-2 libssl1.1_1.1.1o-1 
libssl3_3.0.3-5 libstdc++-11-dev_11.3.0-3 libstdc++6_12.1.0-2 
libsub-override-perl_0.09-2 libsystemd0_251-2 libtasn1-6_4.18.0-4 
libtinfo6_6.3+20220423-2 libtirpc-common_1.3.2-2 libtirpc-dev_1.3.2-2 
libtirpc3_1.3.2-2 libtool_2.4.7-4 libubsan1_12.1.0-2 libuchardet0_0.0.7-1 
libudev1_251-2 libunistring2_1.0-1 libuuid1_2.38-4 libxml2_2.9.14+dfsg-1 
libxxhash0_0.8.1-1 libzstd1_1.5.2+dfsg-1 linux-libc-dev_5.17.6-1+b1 
login_1:4.11.1+dfsg1-2 logsave_1.46.5-2 lsb-base_11.2 m4_1.4.18-5 make_4.3-4.1 
man-db_2.10.2-1 mawk_1.3.4.20200120-3+b1 mount_2.38-4 
ncurses-base_6.3+20220423-2 ncurses-bin_6.3+20220423-2 passwd_1:4.11.1+dfsg1-2 
patch_2.7.6-7 perl_5.34.0-4 perl-base_5.34.0-4 perl-modules-5.34_5.34.0-4 
po-debconf_1.0.21+nmu1 rpcsvc-proto_1.4.2-4 
sbuild-build-depends-main-dummy_0.invalid.0 sed_4.8-1 sensible-utils_0.0.17 
sysvinit-utils_3.03-1 tar_1.34+dfsg-1 tzdata_2022a-1 util-linux_2.38-4 
util-linux-extra_2.38-4 xz-utils_5.2.5-2.1 zlib1g_1:1.2.11.dfsg-4

+------------------------------------------------------------------------------+
| Build                                                                        |
+------------------------------------------------------------------------------+


Unpack source
-------------

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.0
Source: mac-fdisk
Binary: mac-fdisk, pmac-fdisk, mac-fdisk-cross, pmac-fdisk-cross
Architecture: m68k powerpc ppc64 i386
Version: 0.1-18
Maintainer: John Paul Adrian Glaubitz <glaub...@physik.fu-berlin.de>
Standards-Version: 3.5.8.0
Vcs-Browser: https://github.com/glaubitz/mac-fdisk-debian
Vcs-Git: git://github.com/glaubitz/mac-fdisk-debian.git
Build-Depends: debhelper
Package-List:
 mac-fdisk deb utils optional arch=m68k,powerpc,ppc64
 mac-fdisk-cross deb otherosfs optional arch=i386,m68k
 pmac-fdisk deb utils optional arch=powerpc,ppc64
 pmac-fdisk-cross deb otherosfs optional arch=i386,m68k
Checksums-Sha1:
 47013d3d74892d53c31a73e75c32fda2bf173252 55817 mac-fdisk_0.1.orig.tar.gz
 c281f8a0000030b844b8c5fa2d7f6003d015d48f 20267 mac-fdisk_0.1-18.diff.gz
Checksums-Sha256:
 7059fc4ba41ca2ef857e1092e9c56e910f27693d407b5c3d78f7102ad0c56a66 55817 
mac-fdisk_0.1.orig.tar.gz
 49e14aab9deefac5da67ebe8ce72412d27091853806fe2da690ff3854704181e 20267 
mac-fdisk_0.1-18.diff.gz
Files:
 24476329fe86ef6ccf222e233e2a99f1 55817 mac-fdisk_0.1.orig.tar.gz
 4fa9e40c6f06def48286fec018841d2c 20267 mac-fdisk_0.1-18.diff.gz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEYv+KdYTgKVaVRgAGdCY7N/W1+RMFAlnIxpoACgkQdCY7N/W1
+ROVFQ/8CC5po0uxpCYznsxJ/GWerobDX1PjLqCkBPhmZYr547uZQd+HW1P578iw
UTxeF+SF9QdqtbmdHhf977p2pX3zTseOVn0TMzlkxenIgxFGY25p6BRhGOlVMAxd
hQitzrGc58iu928Dps2KBtog3NBos9zNzRdlSDW2RGOAKqX9D/KBgm3OqKrvNR3u
9o3EZoO+BpsgxqkygkoCq2qzmM+8uj/ifZD86+nhNFWEvo6NDfqj8xUKr2g8xIjr
XVUEpR6CET2t5lJX/7VAgk6U/enUEzKBHmtlFbrNs/mVxl4EykJnV6LxVP78k47R
FgqkkPqhMcUf5/VPi24t0sJcMig3D8wNkd5GWvCZGamMfc/1yZzCj0hKifRlwd+k
hDtZHM24hP0ycVBUYnkKItWZP1BcnRYkdlkZR3414Ygeh0H5uiOzzzjbHumOdYPw
UKH6HvfOOzpSGmAF8Hpq9HolnFSZs37THL5hLfX8Mtesb+kkqepWeO4JK3vqxp/h
lmZrnBYggVWdjaHsFEGDmUjCSxB2mnP/OmlpO5u6nLa6y4ZElb8Ig3N5T98EJc5T
Q4wbwX3wrGxNTlfh6VA9TtMXrSrL/TRUhHCHFl5eF9v5TRpQYvwoGqd71ZUIXuxO
v5D9i1KMeZ+iuvvg4qVkytEF6WoADXPE4cetTqNXaIGvQ31jmnQ=
=XekO
-----END PGP SIGNATURE-----

gpgv: unknown type of key resource 'trustedkeys.kbx'
gpgv: keyblock resource '/tmp/dpkg-verify-sig.uofDjkAZ/trustedkeys.kbx': 
General error
gpgv: Signature made Mon Sep 25 09:04:26 2017 UTC
gpgv:                using RSA key 62FF8A7584E029569546000674263B37F5B5F913
gpgv: Can't check signature: No public key
dpkg-source: warning: cannot verify signature ./mac-fdisk_0.1-18.dsc
dpkg-source: info: extracting mac-fdisk in /<<PKGBUILDDIR>>
dpkg-source: info: unpacking mac-fdisk_0.1.orig.tar.gz
dpkg-source: info: applying mac-fdisk_0.1-18.diff.gz
dpkg-source: info: upstream files that have been modified: 
 /<<PKGBUILDDIR>>/Makefile
 /<<PKGBUILDDIR>>/dpme.h
 /<<PKGBUILDDIR>>/dump.c
 /<<PKGBUILDDIR>>/fdisk.c
 /<<PKGBUILDDIR>>/fdisklabel.c
 /<<PKGBUILDDIR>>/fdisklabel.h
 /<<PKGBUILDDIR>>/io.c
 /<<PKGBUILDDIR>>/kernel-defs.h
 /<<PKGBUILDDIR>>/mac-fdisk.8.in
 /<<PKGBUILDDIR>>/partition_map.c
 /<<PKGBUILDDIR>>/partition_map.h
 /<<PKGBUILDDIR>>/pdisk.c
 /<<PKGBUILDDIR>>/pmac-fdisk.8.in

Check disk space
----------------

Sufficient free space for build

User Environment
----------------

APT_CONFIG=/var/lib/sbuild/apt.conf
DEB_BUILD_OPTIONS=parallel=64 color
HOME=/sbuild-nonexistent
LANG=C.UTF-8
LC_ALL=C.UTF-8
LC_CTYPE=C.UTF-8
LD_LIBRARY_PATH=/usr/lib/libeatmydata
LD_PRELOAD=libeatmydata.so
LOGNAME=kilobyte
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
PWD=/<<PKGBUILDDIR>>
SCHROOT_ALIAS_NAME=unstable-i386-sbuild
SCHROOT_CHROOT_NAME=unstable-i386-sbuild
SCHROOT_COMMAND=env
SCHROOT_GID=1000
SCHROOT_GROUP=kilobyte
SCHROOT_SESSION_ID=unstable-i386-sbuild-c89c94f3-c7e0-4819-8956-a172ad00da2c
SCHROOT_UID=1000
SCHROOT_USER=kilobyte
SHELL=/bin/sh
USER=kilobyte

dpkg-buildpackage
-----------------

Command: dpkg-buildpackage --sanitize-env -us -uc -b -rfakeroot
dpkg-buildpackage: info: source package mac-fdisk
dpkg-buildpackage: info: source version 0.1-18
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by John Paul Adrian Glaubitz 
<glaub...@physik.fu-berlin.de>
 dpkg-source --before-build .
dpkg-buildpackage: info: host architecture i386
 fakeroot debian/rules clean
test -f debian/rules
rm -f build
make clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
rm -f *.o pdisk fdisk mac-fdisk pmac-fdisk
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
rm -f `find . -name "*~"`
rm -rf debian/tmp debian/mac-fdisk-cross debian/pmac-fdisk 
debian/pmac-fdisk-cross debian/files* core debian/*substvars
 debian/rules build
test -f debian/rules
make CFLAGS="-O2 -g -Wall"
make[1]: Entering directory '/<<PKGBUILDDIR>>'
cc -O2 -g -Wall   -c -o pdisk.o pdisk.c
In file included from pdisk.c:43:
kernel-defs.h:18: warning: "_IOC_SIZEBITS" redefined
   18 | #define _IOC_SIZEBITS   13
      | 
In file included from /usr/include/i386-linux-gnu/asm/ioctl.h:1,
                 from /usr/include/linux/ioctl.h:5,
                 from /usr/include/asm-generic/ioctls.h:5,
                 from /usr/include/i386-linux-gnu/asm/ioctls.h:1,
                 from /usr/include/i386-linux-gnu/bits/ioctls.h:23,
                 from /usr/include/i386-linux-gnu/sys/ioctl.h:26,
                 from pdisk.c:42:
/usr/include/asm-generic/ioctl.h:32: note: this is the location of the previous 
definition
   32 | # define _IOC_SIZEBITS  14
      | 
In file included from pdisk.c:43:
kernel-defs.h:19: warning: "_IOC_DIRBITS" redefined
   19 | #define _IOC_DIRBITS    3
      | 
In file included from /usr/include/i386-linux-gnu/asm/ioctl.h:1,
                 from /usr/include/linux/ioctl.h:5,
                 from /usr/include/asm-generic/ioctls.h:5,
                 from /usr/include/i386-linux-gnu/asm/ioctls.h:1,
                 from /usr/include/i386-linux-gnu/bits/ioctls.h:23,
                 from /usr/include/i386-linux-gnu/sys/ioctl.h:26,
                 from pdisk.c:42:
/usr/include/asm-generic/ioctl.h:36: note: this is the location of the previous 
definition
   36 | # define _IOC_DIRBITS   2
      | 
pdisk.c: In function ‘main’:
pdisk.c:156:5: warning: implicit declaration of function ‘exit’ 
[-Wimplicit-function-declaration]
  156 |     exit(err);
      |     ^~~~
pdisk.c:52:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
   51 | #include "version.h"
  +++ |+#include <stdlib.h>
   52 | 
pdisk.c:156:5: warning: incompatible implicit declaration of built-in function 
‘exit’ [-Wbuiltin-declaration-mismatch]
  156 |     exit(err);
      |     ^~~~
pdisk.c:156:5: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
pdisk.c: In function ‘do_create_partition’:
pdisk.c:469:13: warning: implicit declaration of function ‘strncmp’ 
[-Wimplicit-function-declaration]
  469 |         if (strncmp(type_name, kFreeType, DPISTRLEN) == 0) {
      |             ^~~~~~~
pdisk.c:52:1: note: include ‘<string.h>’ or provide a declaration of ‘strncmp’
   51 | #include "version.h"
  +++ |+#include <string.h>
   52 | 
In file included from partition_map.h:28,
                 from pdisk.c:49:
dpme.h:48:25: warning: ‘strncmp’ argument 3 type is ‘int’ where ‘unsigned int’ 
is expected in a call to built-in function declared without prototype 
[-Wbuiltin-declaration-mismatch]
   48 | #define DPISTRLEN       32
      |                         ^~
pdisk.c:469:43: note: in expansion of macro ‘DPISTRLEN’
  469 |         if (strncmp(type_name, kFreeType, DPISTRLEN) == 0) {
      |                                           ^~~~~~~~~
<built-in>: note: built-in ‘strncmp’ declared here
dpme.h:48:25: warning: ‘strncmp’ argument 3 type is ‘int’ where ‘unsigned int’ 
is expected in a call to built-in function declared without prototype 
[-Wbuiltin-declaration-mismatch]
   48 | #define DPISTRLEN       32
      |                         ^~
pdisk.c:473:42: note: in expansion of macro ‘DPISTRLEN’
  473 |         if (strncmp(type_name, kMapType, DPISTRLEN) == 0) {
      |                                          ^~~~~~~~~
<built-in>: note: built-in ‘strncmp’ declared here
pdisk.c:439:10: warning: unused variable ‘mult’ [-Wunused-variable]
  439 |     long mult;
      |          ^~~~
pdisk.c: In function ‘do_reorder’:
pdisk.c:601:21: warning: unused variable ‘cur’ [-Wunused-variable]
  601 |     partition_map * cur;
      |                     ^~~
cc -O2 -g -Wall   -c -o dump.o dump.c
dump.c:65:17: warning: missing braces around initializer [-Wmissing-braces]
   65 | NAMES plist[] = {
      |                 ^
   66 |     "Drvr", "Apple_Driver",
      |     {                     }
   67 |     "Dr43", "Apple_Driver43",
      |     {                       }
   68 |     "Free", "Apple_Free",
      |     {                   }
   69 |     " HFS", "Apple_HFS",
      |     {                  }
   70 |     " MFS", "Apple_MFS",
      |     {                  }
   71 |     "PDOS", "Apple_PRODOS",
      |     {                     }
   72 |     "junk", "Apple_Scratch",
      |     {                      }
   73 |     "unix", "Apple_UNIX_SVR2",
      |     {                        }
   74 |     " map", "Apple_partition_map",
      |     {                            }
   75 |     0,  0
      |     {
   76 | };
      | }
dump.c: In function ‘dump_partition_entry’:
dump.c:229:22: warning: format ‘%d’ expects argument of type ‘int’, but 
argument 3 has type ‘long int’ [-Wformat=]
  229 |         printf("%s%-4d  %.4s %-18.32s ", dev, entry->disk_address, s, 
p->dpme_name);
      |                   ~~~^                        ~~~~~~~~~~~~~~~~~~~
      |                      |                             |
      |                      int                           long int
      |                   %-4ld
dump.c:232:22: warning: format ‘%d’ expects argument of type ‘int’, but 
argument 3 has type ‘long int’ [-Wformat=]
  232 |         printf("%s%-4d %20.32s %-18.32s ", dev,
      |                   ~~~^
      |                      |
      |                      int
      |                   %-4ld
  233 |                 entry->disk_address, p->dpme_type, p->dpme_name);
      |                 ~~~~~~~~~~~~~~~~~~~
      |                      |
      |                      long int
dump.c:204:10: warning: unused variable ‘bp’ [-Wunused-variable]
  204 |     BZB *bp;
      |          ^~
dump.c:201:27: warning: variable ‘map’ set but not used 
[-Wunused-but-set-variable]
  201 |     partition_map_header *map;
      |                           ^~~
dump.c: In function ‘list_all_disks’:
dump.c:319:21: warning: implicit declaration of function ‘malloc’ 
[-Wimplicit-function-declaration]
  319 |     data = (DPME *) malloc(PBLOCK_SIZE);
      |                     ^~~~~~
dump.c:45:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
   44 | #include "dump.h"
  +++ |+#include <stdlib.h>
   45 | 
dump.c:319:21: warning: incompatible implicit declaration of built-in function 
‘malloc’ [-Wbuiltin-declaration-mismatch]
  319 |     data = (DPME *) malloc(PBLOCK_SIZE);
      |                     ^~~~~~
dump.c:319:21: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
dump.c:362:5: warning: implicit declaration of function ‘free’ 
[-Wimplicit-function-declaration]
  362 |     free(data);
      |     ^~~~
dump.c:362:5: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
dump.c:362:5: warning: incompatible implicit declaration of built-in function 
‘free’ [-Wbuiltin-declaration-mismatch]
dump.c:362:5: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
dump.c:317:10: warning: unused variable ‘t’ [-Wunused-variable]
  317 |     long t;
      |          ^
dump.c: In function ‘show_data_structures’:
dump.c:384:46: warning: format ‘%u’ expects argument of type ‘unsigned int’, 
but argument 4 has type ‘long unsigned int’ [-Wformat=]
  384 |     printf("map %d blocks out of %d,  media %u blocks\n",
      |                                             ~^
      |                                              |
      |                                              unsigned int
      |                                             %lu
  385 |             map->blocks_in_map, map->maximum_in_map, map->media_size);
      |                                                      ~~~~~~~~~~~~~~~
      |                                                         |
      |                                                         long unsigned 
int
dump.c:428:19: warning: format ‘%d’ expects argument of type ‘int’, but 
argument 2 has type ‘long int’ [-Wformat=]
  428 |         printf("%2d: %20.32s ",
      |                 ~~^
      |                   |
      |                   int
      |                 %2ld
  429 |                 entry->disk_address, p->dpme_type);
      |                 ~~~~~~~~~~~~~~~~~~~
      |                      |
      |                      long int
dump.c:452:19: warning: format ‘%d’ expects argument of type ‘int’, but 
argument 2 has type ‘long int’ [-Wformat=]
  452 |         printf("%2d: ", entry->disk_address);
      |                 ~~^     ~~~~~~~~~~~~~~~~~~~
      |                   |          |
      |                   int        long int
      |                 %2ld
dump.c:469:19: warning: format ‘%d’ expects argument of type ‘int’, but 
argument 2 has type ‘long int’ [-Wformat=]
  469 |         printf("%2d: ", entry->disk_address);
      |                 ~~^     ~~~~~~~~~~~~~~~~~~~
      |                   |          |
      |                   int        long int
      |                 %2ld
dump.c:497:29: warning: format ‘%d’ expects argument of type ‘int’, but 
argument 2 has type ‘long unsigned int’ [-Wformat=]
  497 |                 printf("  %2d", bzb_slice_get(bp)-1);
      |                           ~~^
      |                             |
      |                             int
      |                           %2ld
cc -O2 -g -Wall   -c -o partition_map.o partition_map.c
In file included from partition_map.c:38:
kernel-defs.h:18: warning: "_IOC_SIZEBITS" redefined
   18 | #define _IOC_SIZEBITS   13
      | 
In file included from /usr/include/i386-linux-gnu/asm/ioctl.h:1,
                 from /usr/include/linux/ioctl.h:5,
                 from /usr/include/asm-generic/ioctls.h:5,
                 from /usr/include/i386-linux-gnu/asm/ioctls.h:1,
                 from /usr/include/i386-linux-gnu/bits/ioctls.h:23,
                 from /usr/include/i386-linux-gnu/sys/ioctl.h:26,
                 from partition_map.c:37:
/usr/include/asm-generic/ioctl.h:32: note: this is the location of the previous 
definition
   32 | # define _IOC_SIZEBITS  14
      | 
In file included from partition_map.c:38:
kernel-defs.h:19: warning: "_IOC_DIRBITS" redefined
   19 | #define _IOC_DIRBITS    3
      | 
In file included from /usr/include/i386-linux-gnu/asm/ioctl.h:1,
                 from /usr/include/linux/ioctl.h:5,
                 from /usr/include/asm-generic/ioctls.h:5,
                 from /usr/include/i386-linux-gnu/asm/ioctls.h:1,
                 from /usr/include/i386-linux-gnu/bits/ioctls.h:23,
                 from /usr/include/i386-linux-gnu/sys/ioctl.h:26,
                 from partition_map.c:37:
/usr/include/asm-generic/ioctl.h:36: note: this is the location of the previous 
definition
   36 | # define _IOC_DIRBITS   2
      | 
partition_map.c: In function ‘open_partition_map’:
partition_map.c:129:36: warning: implicit declaration of function ‘malloc’ 
[-Wimplicit-function-declaration]
  129 |     map = (partition_map_header *) malloc(sizeof(partition_map_header));
      |                                    ^~~~~~
partition_map.c:47:1: note: include ‘<stdlib.h>’ or provide a declaration of 
‘malloc’
   46 | #include "errors.h"
  +++ |+#include <stdlib.h>
   47 | 
partition_map.c:129:36: warning: incompatible implicit declaration of built-in 
function ‘malloc’ [-Wbuiltin-declaration-mismatch]
  129 |     map = (partition_map_header *) malloc(sizeof(partition_map_header));
      |                                    ^~~~~~
partition_map.c:129:36: note: include ‘<stdlib.h>’ or provide a declaration of 
‘malloc’
partition_map.c:109:19: warning: unused variable ‘length’ [-Wunused-variable]
  109 |     unsigned long length;
      |                   ^~~~~~
partition_map.c: In function ‘close_partition_map’:
partition_map.c:184:5: warning: implicit declaration of function ‘free’ 
[-Wimplicit-function-declaration]
  184 |     free(map->misc);
      |     ^~~~
partition_map.c:184:5: note: include ‘<stdlib.h>’ or provide a declaration of 
‘free’
partition_map.c:184:5: warning: incompatible implicit declaration of built-in 
function ‘free’ [-Wbuiltin-declaration-mismatch]
partition_map.c:184:5: note: include ‘<stdlib.h>’ or provide a declaration of 
‘free’
partition_map.c: In function ‘read_partition_map’:
partition_map.c:203:21: warning: incompatible implicit declaration of built-in 
function ‘malloc’ [-Wbuiltin-declaration-mismatch]
  203 |     data = (DPME *) malloc(PBLOCK_SIZE);
      |                     ^~~~~~
partition_map.c:203:21: note: include ‘<stdlib.h>’ or provide a declaration of 
‘malloc’
partition_map.c:210:9: warning: incompatible implicit declaration of built-in 
function ‘free’ [-Wbuiltin-declaration-mismatch]
  210 |         free(data);
      |         ^~~~
partition_map.c:210:9: note: include ‘<stdlib.h>’ or provide a declaration of 
‘free’
partition_map.c:214:9: warning: incompatible implicit declaration of built-in 
function ‘free’ [-Wbuiltin-declaration-mismatch]
  214 |         free(data);
      |         ^~~~
partition_map.c:214:9: note: include ‘<stdlib.h>’ or provide a declaration of 
‘free’
partition_map.c:221:17: warning: incompatible implicit declaration of built-in 
function ‘free’ [-Wbuiltin-declaration-mismatch]
  221 |                 free(data);
      |                 ^~~~
partition_map.c:221:17: note: include ‘<stdlib.h>’ or provide a declaration of 
‘free’
partition_map.c:238:17: warning: incompatible implicit declaration of built-in 
function ‘free’ [-Wbuiltin-declaration-mismatch]
  238 |                 free(data);
      |                 ^~~~
partition_map.c:238:17: note: include ‘<stdlib.h>’ or provide a declaration of 
‘free’
partition_map.c:243:17: warning: incompatible implicit declaration of built-in 
function ‘free’ [-Wbuiltin-declaration-mismatch]
  243 |                 free(data);
      |                 ^~~~
partition_map.c:243:17: note: include ‘<stdlib.h>’ or provide a declaration of 
‘free’
partition_map.c: In function ‘write_partition_map’:
partition_map.c:267:26: warning: implicit declaration of function ‘calloc’ 
[-Wimplicit-function-declaration]
  267 |         block = (char *) calloc(1, PBLOCK_SIZE);
      |                          ^~~~~~
partition_map.c:267:26: note: include ‘<stdlib.h>’ or provide a declaration of 
‘calloc’
partition_map.c:267:26: warning: incompatible implicit declaration of built-in 
function ‘calloc’ [-Wbuiltin-declaration-mismatch]
partition_map.c:267:26: note: include ‘<stdlib.h>’ or provide a declaration of 
‘calloc’
partition_map.c:270:13: warning: incompatible implicit declaration of built-in 
function ‘free’ [-Wbuiltin-declaration-mismatch]
  270 |             free(block);
      |             ^~~~
partition_map.c:270:13: note: include ‘<stdlib.h>’ or provide a declaration of 
‘free’
partition_map.c:282:26: warning: incompatible implicit declaration of built-in 
function ‘malloc’ [-Wbuiltin-declaration-mismatch]
  282 |         block = (char *) malloc(PBLOCK_SIZE);
      |                          ^~~~~~
partition_map.c:282:26: note: include ‘<stdlib.h>’ or provide a declaration of 
‘malloc’
partition_map.c:288:13: warning: incompatible implicit declaration of built-in 
function ‘free’ [-Wbuiltin-declaration-mismatch]
  288 |             free(block);
      |             ^~~~
partition_map.c:288:13: note: include ‘<stdlib.h>’ or provide a declaration of 
‘free’
partition_map.c:300:13: warning: implicit declaration of function ‘sync’ 
[-Wimplicit-function-declaration]
  300 |             sync();
      |             ^~~~
partition_map.c:302:9: warning: implicit declaration of function ‘sleep’ 
[-Wimplicit-function-declaration]
  302 |         sleep(2);
      |         ^~~~~
partition_map.c: In function ‘add_data_to_map’:
partition_map.c:350:31: warning: incompatible implicit declaration of built-in 
function ‘malloc’ [-Wbuiltin-declaration-mismatch]
  350 |     entry = (partition_map *) malloc(sizeof(partition_map));
      |                               ^~~~~~
partition_map.c:350:31: note: include ‘<stdlib.h>’ or provide a declaration of 
‘malloc’
partition_map.c:368:13: warning: implicit declaration of function ‘strncmp’ 
[-Wimplicit-function-declaration]
  368 |         if (strncmp(data->dpme_type, kMapType, DPISTRLEN) == 0) {
      |             ^~~~~~~
partition_map.c:47:1: note: include ‘<string.h>’ or provide a declaration of 
‘strncmp’
   46 | #include "errors.h"
  +++ |+#include <string.h>
   47 | 
In file included from partition_map.h:28,
                 from partition_map.c:42:
dpme.h:48:25: warning: ‘strncmp’ argument 3 type is ‘int’ where ‘unsigned int’ 
is expected in a call to built-in function declared without prototype 
[-Wbuiltin-declaration-mismatch]
   48 | #define DPISTRLEN       32
      |                         ^~
partition_map.c:368:48: note: in expansion of macro ‘DPISTRLEN’
  368 |         if (strncmp(data->dpme_type, kMapType, DPISTRLEN) == 0) {
      |                                                ^~~~~~~~~
<built-in>: note: built-in ‘strncmp’ declared here
partition_map.c: In function ‘create_partition_map’:
partition_map.c:421:36: warning: incompatible implicit declaration of built-in 
function ‘malloc’ [-Wbuiltin-declaration-mismatch]
  421 |     map = (partition_map_header *) malloc(sizeof(partition_map_header));
      |                                    ^~~~~~
partition_map.c:421:36: note: include ‘<stdlib.h>’ or provide a declaration of 
‘malloc’
partition_map.c:437:34: warning: format ‘%u’ expects argument of type ‘unsigned 
int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
  437 |     printf("size of 'device' is %u blocks: ", number);
      |                                 ~^            ~~~~~~
      |                                  |            |
      |                                  unsigned int long unsigned int
      |                                 %lu
partition_map.c:443:38: warning: format ‘%u’ expects argument of type ‘unsigned 
int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
  443 |     printf("new size of 'device' is %u blocks\n", number);
      |                                     ~^            ~~~~~~
      |                                      |            |
      |                                      unsigned int long unsigned int
      |                                     %lu
partition_map.c:462:25: warning: incompatible implicit declaration of built-in 
function ‘calloc’ [-Wbuiltin-declaration-mismatch]
  462 |         data = (DPME *) calloc(1, PBLOCK_SIZE);
      |                         ^~~~~~
partition_map.c:462:25: note: include ‘<stdlib.h>’ or provide a declaration of 
‘calloc’
partition_map.c:471:13: warning: implicit declaration of function ‘strncpy’ 
[-Wimplicit-function-declaration]
  471 |             strncpy(data->dpme_name, kFreeName, DPISTRLEN);
      |             ^~~~~~~
partition_map.c:471:13: note: include ‘<string.h>’ or provide a declaration of 
‘strncpy’
partition_map.c:471:13: warning: incompatible implicit declaration of built-in 
function ‘strncpy’ [-Wbuiltin-declaration-mismatch]
partition_map.c:471:13: note: include ‘<string.h>’ or provide a declaration of 
‘strncpy’
In file included from partition_map.h:28,
                 from partition_map.c:42:
dpme.h:138:54: warning: passing argument 1 of ‘bitfield_set’ from incompatible 
pointer type [-Wincompatible-pointer-types]
  138 | #define dpme_writable_set(p, v)         bitfield_set(&p->dpme_flags, 5, 
1, v)
      |                                                      ^~~~~~~~~~~~~~
      |                                                      |
      |                                                      u32 * {aka 
unsigned int *}
partition_map.c:475:13: note: in expansion of macro ‘dpme_writable_set’
  475 |             dpme_writable_set(data, 1);
      |             ^~~~~~~~~~~~~~~~~
In file included from dpme.h:41,
                 from partition_map.h:28,
                 from partition_map.c:42:
bitfield.h:66:43: note: expected ‘long unsigned int *’ but argument is of type 
‘u32 *’ {aka ‘unsigned int *’}
   66 | unsigned long bitfield_set(unsigned long *bf, int base, int length, 
unsigned long value);
      |                            ~~~~~~~~~~~~~~~^~
In file included from partition_map.h:28,
                 from partition_map.c:42:
dpme.h:139:54: warning: passing argument 1 of ‘bitfield_set’ from incompatible 
pointer type [-Wincompatible-pointer-types]
  139 | #define dpme_readable_set(p, v)         bitfield_set(&p->dpme_flags, 4, 
1, v)
      |                                                      ^~~~~~~~~~~~~~
      |                                                      |
      |                                                      u32 * {aka 
unsigned int *}
partition_map.c:476:13: note: in expansion of macro ‘dpme_readable_set’
  476 |             dpme_readable_set(data, 1);
      |             ^~~~~~~~~~~~~~~~~
In file included from dpme.h:41,
                 from partition_map.h:28,
                 from partition_map.c:42:
bitfield.h:66:43: note: expected ‘long unsigned int *’ but argument is of type 
‘u32 *’ {aka ‘unsigned int *’}
   66 | unsigned long bitfield_set(unsigned long *bf, int base, int length, 
unsigned long value);
      |                            ~~~~~~~~~~~~~~~^~
In file included from partition_map.h:28,
                 from partition_map.c:42:
dpme.h:140:54: warning: passing argument 1 of ‘bitfield_set’ from incompatible 
pointer type [-Wincompatible-pointer-types]
  140 | #define dpme_bootable_set(p, v)         bitfield_set(&p->dpme_flags, 3, 
1, v)
      |                                                      ^~~~~~~~~~~~~~
      |                                                      |
      |                                                      u32 * {aka 
unsigned int *}
partition_map.c:477:13: note: in expansion of macro ‘dpme_bootable_set’
  477 |             dpme_bootable_set(data, 0);
      |             ^~~~~~~~~~~~~~~~~
In file included from dpme.h:41,
                 from partition_map.h:28,
                 from partition_map.c:42:
bitfield.h:66:43: note: expected ‘long unsigned int *’ but argument is of type 
‘u32 *’ {aka ‘unsigned int *’}
   66 | unsigned long bitfield_set(unsigned long *bf, int base, int length, 
unsigned long value);
      |                            ~~~~~~~~~~~~~~~^~
In file included from partition_map.h:28,
                 from partition_map.c:42:
dpme.h:141:54: warning: passing argument 1 of ‘bitfield_set’ from incompatible 
pointer type [-Wincompatible-pointer-types]
  141 | #define dpme_in_use_set(p, v)           bitfield_set(&p->dpme_flags, 2, 
1, v)
      |                                                      ^~~~~~~~~~~~~~
      |                                                      |
      |                                                      u32 * {aka 
unsigned int *}
partition_map.c:478:13: note: in expansion of macro ‘dpme_in_use_set’
  478 |             dpme_in_use_set(data, 0);
      |             ^~~~~~~~~~~~~~~
In file included from dpme.h:41,
                 from partition_map.h:28,
                 from partition_map.c:42:
bitfield.h:66:43: note: expected ‘long unsigned int *’ but argument is of type 
‘u32 *’ {aka ‘unsigned int *’}
   66 | unsigned long bitfield_set(unsigned long *bf, int base, int length, 
unsigned long value);
      |                            ~~~~~~~~~~~~~~~^~
In file included from partition_map.h:28,
                 from partition_map.c:42:
dpme.h:142:54: warning: passing argument 1 of ‘bitfield_set’ from incompatible 
pointer type [-Wincompatible-pointer-types]
  142 | #define dpme_allocated_set(p, v)        bitfield_set(&p->dpme_flags, 1, 
1, v)
      |                                                      ^~~~~~~~~~~~~~
      |                                                      |
      |                                                      u32 * {aka 
unsigned int *}
partition_map.c:479:13: note: in expansion of macro ‘dpme_allocated_set’
  479 |             dpme_allocated_set(data, 0);
      |             ^~~~~~~~~~~~~~~~~~
In file included from dpme.h:41,
                 from partition_map.h:28,
                 from partition_map.c:42:
bitfield.h:66:43: note: expected ‘long unsigned int *’ but argument is of type 
‘u32 *’ {aka ‘unsigned int *’}
   66 | unsigned long bitfield_set(unsigned long *bf, int base, int length, 
unsigned long value);
      |                            ~~~~~~~~~~~~~~~^~
In file included from partition_map.h:28,
                 from partition_map.c:42:
dpme.h:143:54: warning: passing argument 1 of ‘bitfield_set’ from incompatible 
pointer type [-Wincompatible-pointer-types]
  143 | #define dpme_valid_set(p, v)            bitfield_set(&p->dpme_flags, 0, 
1, v)
      |                                                      ^~~~~~~~~~~~~~
      |                                                      |
      |                                                      u32 * {aka 
unsigned int *}
partition_map.c:480:13: note: in expansion of macro ‘dpme_valid_set’
  480 |             dpme_valid_set(data, 1);
      |             ^~~~~~~~~~~~~~
In file included from dpme.h:41,
                 from partition_map.h:28,
                 from partition_map.c:42:
bitfield.h:66:43: note: expected ‘long unsigned int *’ but argument is of type 
‘u32 *’ {aka ‘unsigned int *’}
   66 | unsigned long bitfield_set(unsigned long *bf, int base, int length, 
unsigned long value);
      |                            ~~~~~~~~~~~~~~~^~
partition_map.c:483:17: warning: incompatible implicit declaration of built-in 
function ‘free’ [-Wbuiltin-declaration-mismatch]
  483 |                 free(data);
      |                 ^~~~
partition_map.c:483:17: note: include ‘<stdlib.h>’ or provide a declaration of 
‘free’
partition_map.c:408:9: warning: unused variable ‘ok’ [-Wunused-variable]
  408 |     int ok;
      |         ^~
partition_map.c:406:19: warning: unused variable ‘length’ [-Wunused-variable]
  406 |     unsigned long length;
      |                   ^~~~~~
In file included from partition_map.h:28,
                 from partition_map.c:42:
partition_map.c: In function ‘add_partition_to_map’:
dpme.h:48:25: warning: ‘strncmp’ argument 3 type is ‘int’ where ‘unsigned int’ 
is expected in a call to built-in function declared without prototype 
[-Wbuiltin-declaration-mismatch]
   48 | #define DPISTRLEN       32
      |                         ^~
partition_map.c:543:57: note: in expansion of macro ‘DPISTRLEN’
  543 |             || strncmp(cur->data->dpme_type, kFreeType, DPISTRLEN) != 
0) {
      |                                                         ^~~~~~~~~
<built-in>: note: built-in ‘strncmp’ declared here
partition_map.c:589:9: warning: incompatible implicit declaration of built-in 
function ‘free’ [-Wbuiltin-declaration-mismatch]
  589 |         free(cur->data);
      |         ^~~~
partition_map.c:589:9: note: include ‘<stdlib.h>’ or provide a declaration of 
‘free’
partition_map.c:598:13: warning: incompatible implicit declaration of built-in 
function ‘free’ [-Wbuiltin-declaration-mismatch]
  598 |             free(data);
      |             ^~~~
partition_map.c:598:13: note: include ‘<stdlib.h>’ or provide a declaration of 
‘free’
partition_map.c:604:21: warning: incompatible implicit declaration of built-in 
function ‘free’ [-Wbuiltin-declaration-mismatch]
  604 |                     free(data);
      |                     ^~~~
partition_map.c:604:21: note: include ‘<stdlib.h>’ or provide a declaration of 
‘free’
partition_map.c: In function ‘create_data’:
partition_map.c:622:21: warning: incompatible implicit declaration of built-in 
function ‘calloc’ [-Wbuiltin-declaration-mismatch]
  622 |     data = (DPME *) calloc(1, PBLOCK_SIZE);
      |                     ^~~~~~
partition_map.c:622:21: note: include ‘<stdlib.h>’ or provide a declaration of 
‘calloc’
partition_map.c:631:9: warning: incompatible implicit declaration of built-in 
function ‘strncpy’ [-Wbuiltin-declaration-mismatch]
  631 |         strncpy(data->dpme_name, name, DPISTRLEN);
      |         ^~~~~~~
partition_map.c:631:9: note: include ‘<string.h>’ or provide a declaration of 
‘strncpy’
In file included from partition_map.h:28,
                 from partition_map.c:42:
dpme.h:138:54: warning: passing argument 1 of ‘bitfield_set’ from incompatible 
pointer type [-Wincompatible-pointer-types]
  138 | #define dpme_writable_set(p, v)         bitfield_set(&p->dpme_flags, 5, 
1, v)
      |                                                      ^~~~~~~~~~~~~~
      |                                                      |
      |                                                      u32 * {aka 
unsigned int *}
partition_map.c:635:9: note: in expansion of macro ‘dpme_writable_set’
  635 |         dpme_writable_set(data, 1);
      |         ^~~~~~~~~~~~~~~~~
In file included from dpme.h:41,
                 from partition_map.h:28,
                 from partition_map.c:42:
bitfield.h:66:43: note: expected ‘long unsigned int *’ but argument is of type 
‘u32 *’ {aka ‘unsigned int *’}
   66 | unsigned long bitfield_set(unsigned long *bf, int base, int length, 
unsigned long value);
      |                            ~~~~~~~~~~~~~~~^~
In file included from partition_map.h:28,
                 from partition_map.c:42:
dpme.h:139:54: warning: passing argument 1 of ‘bitfield_set’ from incompatible 
pointer type [-Wincompatible-pointer-types]
  139 | #define dpme_readable_set(p, v)         bitfield_set(&p->dpme_flags, 4, 
1, v)
      |                                                      ^~~~~~~~~~~~~~
      |                                                      |
      |                                                      u32 * {aka 
unsigned int *}
partition_map.c:636:9: note: in expansion of macro ‘dpme_readable_set’
  636 |         dpme_readable_set(data, 1);
      |         ^~~~~~~~~~~~~~~~~
In file included from dpme.h:41,
                 from partition_map.h:28,
                 from partition_map.c:42:
bitfield.h:66:43: note: expected ‘long unsigned int *’ but argument is of type 
‘u32 *’ {aka ‘unsigned int *’}
   66 | unsigned long bitfield_set(unsigned long *bf, int base, int length, 
unsigned long value);
      |                            ~~~~~~~~~~~~~~~^~
In file included from partition_map.h:28,
                 from partition_map.c:42:
dpme.h:140:54: warning: passing argument 1 of ‘bitfield_set’ from incompatible 
pointer type [-Wincompatible-pointer-types]
  140 | #define dpme_bootable_set(p, v)         bitfield_set(&p->dpme_flags, 3, 
1, v)
      |                                                      ^~~~~~~~~~~~~~
      |                                                      |
      |                                                      u32 * {aka 
unsigned int *}
partition_map.c:637:9: note: in expansion of macro ‘dpme_bootable_set’
  637 |         dpme_bootable_set(data, 0);
      |         ^~~~~~~~~~~~~~~~~
In file included from dpme.h:41,
                 from partition_map.h:28,
                 from partition_map.c:42:
bitfield.h:66:43: note: expected ‘long unsigned int *’ but argument is of type 
‘u32 *’ {aka ‘unsigned int *’}
   66 | unsigned long bitfield_set(unsigned long *bf, int base, int length, 
unsigned long value);
      |                            ~~~~~~~~~~~~~~~^~
In file included from partition_map.h:28,
                 from partition_map.c:42:
dpme.h:141:54: warning: passing argument 1 of ‘bitfield_set’ from incompatible 
pointer type [-Wincompatible-pointer-types]
  141 | #define dpme_in_use_set(p, v)           bitfield_set(&p->dpme_flags, 2, 
1, v)
      |                                                      ^~~~~~~~~~~~~~
      |                                                      |
      |                                                      u32 * {aka 
unsigned int *}
partition_map.c:638:9: note: in expansion of macro ‘dpme_in_use_set’
  638 |         dpme_in_use_set(data, 0);
      |         ^~~~~~~~~~~~~~~
In file included from dpme.h:41,
                 from partition_map.h:28,
                 from partition_map.c:42:
bitfield.h:66:43: note: expected ‘long unsigned int *’ but argument is of type 
‘u32 *’ {aka ‘unsigned int *’}
   66 | unsigned long bitfield_set(unsigned long *bf, int base, int length, 
unsigned long value);
      |                            ~~~~~~~~~~~~~~~^~
In file included from partition_map.h:28,
                 from partition_map.c:42:
dpme.h:142:54: warning: passing argument 1 of ‘bitfield_set’ from incompatible 
pointer type [-Wincompatible-pointer-types]
  142 | #define dpme_allocated_set(p, v)        bitfield_set(&p->dpme_flags, 1, 
1, v)
      |                                                      ^~~~~~~~~~~~~~
      |                                                      |
      |                                                      u32 * {aka 
unsigned int *}
partition_map.c:639:9: note: in expansion of macro ‘dpme_allocated_set’
  639 |         dpme_allocated_set(data, 1);
      |         ^~~~~~~~~~~~~~~~~~
In file included from dpme.h:41,
                 from partition_map.h:28,
                 from partition_map.c:42:
bitfield.h:66:43: note: expected ‘long unsigned int *’ but argument is of type 
‘u32 *’ {aka ‘unsigned int *’}
   66 | unsigned long bitfield_set(unsigned long *bf, int base, int length, 
unsigned long value);
      |                            ~~~~~~~~~~~~~~~^~
In file included from partition_map.h:28,
                 from partition_map.c:42:
dpme.h:143:54: warning: passing argument 1 of ‘bitfield_set’ from incompatible 
pointer type [-Wincompatible-pointer-types]
  143 | #define dpme_valid_set(p, v)            bitfield_set(&p->dpme_flags, 0, 
1, v)
      |                                                      ^~~~~~~~~~~~~~
      |                                                      |
      |                                                      u32 * {aka 
unsigned int *}
partition_map.c:640:9: note: in expansion of macro ‘dpme_valid_set’
  640 |         dpme_valid_set(data, 1);
      |         ^~~~~~~~~~~~~~
In file included from dpme.h:41,
                 from partition_map.h:28,
                 from partition_map.c:42:
bitfield.h:66:43: note: expected ‘long unsigned int *’ but argument is of type 
‘u32 *’ {aka ‘unsigned int *’}
   66 | unsigned long bitfield_set(unsigned long *bf, int base, int length, 
unsigned long value);
      |                            ~~~~~~~~~~~~~~~^~
partition_map.c: In function ‘compute_device_size’:
partition_map.c:712:21: warning: incompatible implicit declaration of built-in 
function ‘malloc’ [-Wbuiltin-declaration-mismatch]
  712 |     data = (char *) malloc(PBLOCK_SIZE);
      |                     ^~~~~~
partition_map.c:712:21: note: include ‘<stdlib.h>’ or provide a declaration of 
‘malloc’
partition_map.c:748:9: warning: incompatible implicit declaration of built-in 
function ‘free’ [-Wbuiltin-declaration-mismatch]
  748 |         free(data);
      |         ^~~~
partition_map.c:748:9: note: include ‘<stdlib.h>’ or provide a declaration of 
‘free’
In file included from partition_map.h:28,
                 from partition_map.c:42:
partition_map.c: In function ‘delete_partition_from_map’:
dpme.h:48:25: warning: ‘strncmp’ argument 3 type is ‘int’ where ‘unsigned int’ 
is expected in a call to built-in function declared without prototype 
[-Wbuiltin-declaration-mismatch]
   48 | #define DPISTRLEN       32
      |                         ^~
partition_map.c:761:51: note: in expansion of macro ‘DPISTRLEN’
  761 |     if (strncmp(entry->data->dpme_type, kMapType, DPISTRLEN) == 0) {
      |                                                   ^~~~~~~~~
<built-in>: note: built-in ‘strncmp’ declared here
partition_map.c:774:5: warning: incompatible implicit declaration of built-in 
function ‘free’ [-Wbuiltin-declaration-mismatch]
  774 |     free(entry->data);
      |     ^~~~
partition_map.c:774:5: note: include ‘<stdlib.h>’ or provide a declaration of 
‘free’
In file included from partition_map.h:28,
                 from partition_map.c:42:
partition_map.c: In function ‘combine_entry’:
dpme.h:48:25: warning: ‘strncmp’ argument 3 type is ‘int’ where ‘unsigned int’ 
is expected in a call to built-in function declared without prototype 
[-Wbuiltin-declaration-mismatch]
   48 | #define DPISTRLEN       32
      |                         ^~
partition_map.c:820:59: note: in expansion of macro ‘DPISTRLEN’
  820 |             || strncmp(entry->data->dpme_type, kFreeType, DPISTRLEN) != 
0) {
      |                                                           ^~~~~~~~~
<built-in>: note: built-in ‘strncmp’ declared here
dpme.h:48:25: warning: ‘strncmp’ argument 3 type is ‘int’ where ‘unsigned int’ 
is expected in a call to built-in function declared without prototype 
[-Wbuiltin-declaration-mismatch]
   48 | #define DPISTRLEN       32
      |                         ^~
partition_map.c:825:52: note: in expansion of macro ‘DPISTRLEN’
  825 |         if (strncmp(p->data->dpme_type, kFreeType, DPISTRLEN) != 0) {
      |                                                    ^~~~~~~~~
<built-in>: note: built-in ‘strncmp’ declared here
dpme.h:48:25: warning: ‘strncmp’ argument 3 type is ‘int’ where ‘unsigned int’ 
is expected in a call to built-in function declared without prototype 
[-Wbuiltin-declaration-mismatch]
   48 | #define DPISTRLEN       32
      |                         ^~
partition_map.c:838:52: note: in expansion of macro ‘DPISTRLEN’
  838 |         if (strncmp(p->data->dpme_type, kFreeType, DPISTRLEN) != 0) {
      |                                                    ^~~~~~~~~
<built-in>: note: built-in ‘strncmp’ declared here
partition_map.c: In function ‘delete_entry’:
partition_map.c:875:5: warning: incompatible implicit declaration of built-in 
function ‘free’ [-Wbuiltin-declaration-mismatch]
  875 |     free(entry->data);
      |     ^~~~
partition_map.c:875:5: note: include ‘<stdlib.h>’ or provide a declaration of 
‘free’
In file included from partition_map.h:28,
                 from partition_map.c:42:
partition_map.c: In function ‘resize_map’:
dpme.h:48:25: warning: ‘strncmp’ argument 3 type is ‘int’ where ‘unsigned int’ 
is expected in a call to built-in function declared without prototype 
[-Wbuiltin-declaration-mismatch]
   48 | #define DPISTRLEN       32
      |                         ^~
partition_map.c:1017:55: note: in expansion of macro ‘DPISTRLEN’
 1017 |         if (strncmp(entry->data->dpme_type, kMapType, DPISTRLEN) == 0) {
      |                                                       ^~~~~~~~~
<built-in>: note: built-in ‘strncmp’ declared here
dpme.h:48:25: warning: ‘strncmp’ argument 3 type is ‘int’ where ‘unsigned int’ 
is expected in a call to built-in function declared without prototype 
[-Wbuiltin-declaration-mismatch]
   48 | #define DPISTRLEN       32
      |                         ^~
partition_map.c:1037:62: note: in expansion of macro ‘DPISTRLEN’
 1037 |                 || strncmp(next->data->dpme_type, kFreeType, DPISTRLEN) 
!= 0) {
      |                                                              ^~~~~~~~~
<built-in>: note: built-in ‘strncmp’ declared here
dpme.h:48:25: warning: ‘strncmp’ argument 3 type is ‘int’ where ‘unsigned int’ 
is expected in a call to built-in function declared without prototype 
[-Wbuiltin-declaration-mismatch]
   48 | #define DPISTRLEN       32
      |                         ^~
partition_map.c:1054:58: note: in expansion of macro ‘DPISTRLEN’
 1054 |             || strncmp(next->data->dpme_type, kFreeType, DPISTRLEN) != 
0) {
      |                                                          ^~~~~~~~~
<built-in>: note: built-in ‘strncmp’ declared here
partition_map.c: In function ‘write_partition_map’:
partition_map.c:328:13: warning: ‘saved_errno’ may be used uninitialized in 
this function [-Wmaybe-uninitialized]
  328 |             error(saved_errno, "Re-read of partition map failed");
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
partition_map.c:281:11: warning: ‘i’ may be used uninitialized in this function 
[-Wmaybe-uninitialized]
  281 |         i += 1;
      |         ~~^~~~
partition_map.c: In function ‘create_data’:
partition_map.c:631:9: warning: ‘strncpy’ specified bound 32 equals destination 
size [-Wstringop-truncation]
  631 |         strncpy(data->dpme_name, name, DPISTRLEN);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
partition_map.c:632:9: warning: ‘strncpy’ specified bound 32 equals destination 
size [-Wstringop-truncation]
  632 |         strncpy(data->dpme_type, dptype, DPISTRLEN);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
partition_map.c: In function ‘compute_device_size’:
partition_map.c:744:12: warning: ‘valid’ may be used uninitialized in this 
function [-Wmaybe-uninitialized]
  744 |         if (valid != 0) {
      |            ^
partition_map.c:745:15: warning: ‘x’ may be used uninitialized in this function 
[-Wmaybe-uninitialized]
  745 |             x = x + 1;
      |             ~~^~~~~~~
partition_map.c: In function ‘create_partition_map’:
partition_map.c:471:13: warning: ‘strncpy’ specified bound 32 equals 
destination size [-Wstringop-truncation]
  471 |             strncpy(data->dpme_name, kFreeName, DPISTRLEN);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
partition_map.c:472:13: warning: ‘strncpy’ specified bound 32 equals 
destination size [-Wstringop-truncation]
  472 |             strncpy(data->dpme_type, kFreeType, DPISTRLEN);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
partition_map.c: In function ‘add_partition_to_map’:
partition_map.c:600:20: warning: ‘new_length’ may be used uninitialized in this 
function [-Wmaybe-uninitialized]
  600 |             data = create_data(kFreeName, kFreeType, new_base, 
new_length);
      |                    
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
partition_map.c:600:20: warning: ‘new_base’ may be used uninitialized in this 
function [-Wmaybe-uninitialized]
cc -O2 -g -Wall   -c -o convert.o convert.c
cc -O2 -g -Wall   -c -o io.o io.c
io.c: In function ‘get_string’:
io.c:329:26: warning: implicit declaration of function ‘malloc’ 
[-Wimplicit-function-declaration]
  329 |     ret_value = (char *) malloc(STRING_CHUNK);
      |                          ^~~~~~
io.c:46:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
   45 | #include "errors.h"
  +++ |+#include <stdlib.h>
   46 | 
io.c:329:26: warning: incompatible implicit declaration of built-in function 
‘malloc’ [-Wbuiltin-declaration-mismatch]
  329 |     ret_value = (char *) malloc(STRING_CHUNK);
      |                          ^~~~~~
io.c:329:26: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
io.c:348:13: warning: implicit declaration of function ‘free’ 
[-Wimplicit-function-declaration]
  348 |             free(ret_value);
      |             ^~~~
io.c:348:13: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
io.c:348:13: warning: incompatible implicit declaration of built-in function 
‘free’ [-Wbuiltin-declaration-mismatch]
io.c:348:13: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
io.c: In function ‘read_block’:
io.c:445:18: warning: implicit declaration of function ‘lseek64’; did you mean 
‘lseek’? [-Wimplicit-function-declaration]
  445 |         if ((x = lseek64(fd, x, 0)) < 0) {
      |                  ^~~~~~~
      |                  lseek
io.c: In function ‘write_block’:
io.c:469:36: warning: format ‘%u’ expects argument of type ‘unsigned int’, but 
argument 2 has type ‘long unsigned int’ [-Wformat=]
  469 |         printf("Can't write block %u to file", num);
      |                                   ~^           ~~~
      |                                    |           |
      |                                    |           long unsigned int
      |                                    unsigned int
      |                                   %lu
io.c: In function ‘open_device’:
io.c:533:16: warning: implicit declaration of function ‘open’; did you mean 
‘popen’? [-Wimplicit-function-declaration]
  533 |         return open(path, oflag);
      |                ^~~~
      |                popen
cc -O2 -g -Wall   -c -o errors.o errors.c
errors.c: In function ‘fatal’:
errors.c:118:30: error: ‘sys_nerr’ undeclared (first use in this function)
  118 |     if (value > 0 && value < sys_nerr) {
      |                              ^~~~~~~~
errors.c:118:30: note: each undeclared identifier is reported only once for 
each function it appears in
errors.c:119:37: error: ‘sys_errlist’ undeclared (first use in this function)
  119 |         fprintf(stderr, "  (%s)\n", sys_errlist[value]);
      |                                     ^~~~~~~~~~~
errors.c:127:5: warning: implicit declaration of function ‘exit’ 
[-Wimplicit-function-declaration]
  127 |     exit(value);
      |     ^~~~
errors.c:37:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
   36 | #include "pdisk.h"
  +++ |+#include <stdlib.h>
   37 | 
errors.c:127:5: warning: incompatible implicit declaration of built-in function 
‘exit’ [-Wbuiltin-declaration-mismatch]
  127 |     exit(value);
      |     ^~~~
errors.c:127:5: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
errors.c: In function ‘error’:
errors.c:147:30: error: ‘sys_nerr’ undeclared (first use in this function)
  147 |     if (value > 0 && value < sys_nerr) {
      |                              ^~~~~~~~
errors.c:148:37: error: ‘sys_errlist’ undeclared (first use in this function)
  148 |         fprintf(stderr, "  (%s)\n", sys_errlist[value]);
      |                                     ^~~~~~~~~~~
make[1]: *** [<builtin>: errors.o] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:33: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2022-05-24T15:36:39Z

Finished
--------


+------------------------------------------------------------------------------+
| Cleanup                                                                      |
+------------------------------------------------------------------------------+

Not cleaning session: cloned chroot in use
E: Build failure (dpkg-buildpackage died)

+------------------------------------------------------------------------------+
| Summary                                                                      |
+------------------------------------------------------------------------------+

Build Architecture: i386
Build Type: binary
Build-Space: 516
Build-Time: 2
Distribution: unstable
Fail-Stage: build
Host Architecture: i386
Install-Time: 6
Job: mac-fdisk
Machine Architecture: amd64
Package: mac-fdisk
Package-Time: 18
Source-Version: 0.1-18
Space: 516
Status: attempted
Version: 0.1-18
--------------------------------------------------------------------------------
Finished at 2022-05-24T15:36:39Z
Build needed 00:00:18, 516k disk space

Reply via email to