Build of recoverdm with vanilla toolchain

The build took 00h 00m 51s and was SUCCESSFUL.

The program in this build is written in the following languages, according to sloccount:

SLOCLanguage
1,170 ansic
21 makefile
1,191 total

The process tree of the build process is here.

Log

To avoid scrolling, you may jump to the last line of the invocation of makepkg that was used to build this package.

Removed vanilla repositories from pacman.conf and added:
# [tuscan]
# Server = file:///var/cache/pacman/pkg/

CMD: pacman -Syy --noconfirm
# :: Synchronizing package databases...
# downloading tuscan.db...

CMD: sudo -u tuscan red makepkg --noextract --syncdeps --skipinteg --skippgpcheck --skipchecksums --noconfirm --nocolor --log --noprogressbar --nocheck
# ==> Making package: recoverdm 0.20-4 (Wed Aug 24 13:26:28 UTC 2016)
# ==> Checking runtime dependencies...
# ==> Checking buildtime dependencies...
# ==> WARNING: Using existing $srcdir/ tree
# ==> Starting build()...
# cc -Wall -Wshadow -Wconversion -Wwrite-strings -Winline -O2 -DVERSION=\"0.20\" -c -o recoverdm.o recoverdm.c
# cc -Wall -Wshadow -Wconversion -Wwrite-strings -Winline -O2 -DVERSION=\"0.20\" -c -o dev.o dev.c
# dev.c: In function 'read_raw_cd':
# dev.c:174:2: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
# memcpy(whereto, &pframe[12 + 4], 2048);
# ^~~~~~
# dev.c:174:2: warning: incompatible implicit declaration of built-in function 'memcpy'
# dev.c:174:2: note: include '' or provide a declaration of 'memcpy'
# recoverdm.c: In function 'lba_to_msf':
# recoverdm.c:55:13: warning: conversion to 'unsigned char' from 'off64_t {aka long int}' may alter its value [-Wconversion]
# *minute = (lba + 150) / (60 * 75);
# ^
# recoverdm.c:57:13: warning: conversion to 'unsigned char' from 'off64_t {aka long int}' may alter its value [-Wconversion]
# *second = (lba + 150) / 75;
# ^
# recoverdm.c:59:12: warning: conversion to 'unsigned char' from 'off64_t {aka long int}' may alter its value [-Wconversion]
# *frame = (lba + 150);
# ^
# recoverdm.c:63:13: warning: conversion to 'unsigned char' from 'off64_t {aka long int}' may alter its value [-Wconversion]
# *minute = (lba + 450150) / (60 * 75);
# ^
# recoverdm.c:65:13: warning: conversion to 'unsigned char' from 'off64_t {aka long int}' may alter its value [-Wconversion]
# *second = (lba + 450150) / 75;
# ^
# recoverdm.c:67:12: warning: conversion to 'unsigned char' from 'off64_t {aka long int}' may alter its value [-Wconversion]
# *frame = (lba + 450150);
# ^
# recoverdm.c: In function 'create_sector':
# recoverdm.c:75:50: warning: passing argument 2 of 'mymalloc' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
# char *sector_out = (char *)mymalloc(block_size, "sector");
# ^~~~~~~~
# In file included from recoverdm.c:13:0:
# utils.h:1:8: note: expected 'char *' but argument is of type 'const char *'
# void * mymalloc(size_t size, char *what);
# ^~~~~~~~
# recoverdm.c:107:25: warning: conversion to 'short int' from 'int' may alter its value [-Wconversion]
# chosen_byte_count = count[loop2];
# ^~~~~
# recoverdm.c:108:19: warning: conversion to 'short int' from 'int' may alter its value [-Wconversion]
# chosen_byte = loop2;
# ^~~~~
# recoverdm.c:126:23: warning: conversion to 'char' from 'short int' may alter its value [-Wconversion]
# sector_out[loop] = chosen_byte;
# ^~~~~~~~~~~
# recoverdm.c:149:23: warning: conversion to 'char' from 'unsigned char' may change the sign of the result [-Wsign-conversion]
# sector_out[loop] = sectors[max_n_ok_index][loop];
# ^~~~~~~
# recoverdm.c: In function 'get_raw_cd':
# recoverdm.c:169:57: warning: conversion to 'long unsigned int' from 'int' may change the sign of the result [-Wsign-conversion]
# char **sector_list = (char **)mymalloc(sizeof(char *) * n_raw_retries, "sectorlist");
# ^
# recoverdm.c:169:74: warning: passing argument 2 of 'mymalloc' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
# char **sector_list = (char **)mymalloc(sizeof(char *) * n_raw_retries, "sectorlist");
# ^~~~~~~~~~~~
# In file included from recoverdm.c:13:0:
# utils.h:1:8: note: expected 'char *' but argument is of type 'const char *'
# void * mymalloc(size_t size, char *what);
# ^~~~~~~~
# recoverdm.c:174:53: warning: passing argument 2 of 'mymalloc' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
# sector_list[loop] = (char *)mymalloc(block_size, "sector");
# ^~~~~~~~
# In file included from recoverdm.c:13:0:
# utils.h:1:8: note: expected 'char *' but argument is of type 'const char *'
# void * mymalloc(size_t size, char *what);
# ^~~~~~~~
# recoverdm.c:184:22: warning: passing argument 1 of 'create_sector' from incompatible pointer type [-Wincompatible-pointer-types]
# if (create_sector(sector_list, n_raw_retries, block_size, &dummy) == -1)
# ^~~~~~~~~~~
# recoverdm.c:71:5: note: expected 'unsigned char **' but argument is of type 'char **'
# int create_sector(unsigned char **sectors, int n_sectors, size_t block_size, char **psector_out)
# ^~~~~~~~~~~~~
# recoverdm.c: In function 'main':
# recoverdm.c:235:15: warning: conversion to 'char' from 'int' may alter its value [-Wconversion]
# dev_type = atoi(optarg);
# ^~~~
# recoverdm.c:256:16: warning: conversion to 'char' from 'int' may alter its value [-Wconversion]
# n_retries = atoi(optarg);
# ^~~~
# recoverdm.c:262:15: warning: conversion to 'char' from 'int' may alter its value [-Wconversion]
# cd_speed = atoi(optarg);
# ^~~~
# recoverdm.c:265:23: warning: conversion to 'char' from 'int' may alter its value [-Wconversion]
# n_raw_cd_retries = atoi(optarg);
# ^~~~
# recoverdm.c:307:40: warning: passing argument 2 of 'mymalloc' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
# buffer = (char *)mymalloc(block_size, "sectorbuffer");
# ^~~~~~~~~~~~~~
# In file included from recoverdm.c:13:0:
# utils.h:1:8: note: expected 'char *' but argument is of type 'const char *'
# void * mymalloc(size_t size, char *what);
# ^~~~~~~~
# recoverdm.c:308:41: warning: passing argument 2 of 'mymalloc' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
# buffer2 = (char *)mymalloc(block_size, "sectorbuffer for retries");
# ^~~~~~~~~~~~~~~~~~~~~~~~~~
# In file included from recoverdm.c:13:0:
# utils.h:1:8: note: expected 'char *' but argument is of type 'const char *'
# void * mymalloc(size_t size, char *what);
# ^~~~~~~~
# recoverdm.c:361:14: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'off64_t {aka long int}' [-Wformat=]
# printf("%lld\r", curpos);
# ^
# recoverdm.c:388:24: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'off64_t {aka long int}' [-Wformat=]
# printf("error at %lld bytes, retrying: %d\n", curpos, n);
# ^
# recoverdm.c:445:56: warning: conversion to 'size_t {aka long unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
# fprintf(dsecfile, "%lld %ld\n", curpos, block_size*skip_value);
# ^
# recoverdm.c:445:28: warning: format '%lld' expects argument of type 'long long int', but argument 3 has type 'off64_t {aka long int}' [-Wformat=]
# fprintf(dsecfile, "%lld %ld\n", curpos, block_size*skip_value);
# ^
# recoverdm.c:440:10: warning: variable 'ok' set but not used [-Wunused-but-set-variable]
# char ok = 1;
# ^~
# cc -Wall -Wshadow -Wconversion -Wwrite-strings -Winline -O2 -DVERSION=\"0.20\" -c -o io.o io.c
# io.c: In function 'READ':
# io.c:30:17: warning: passing argument 1 of 'error_exit' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
# error_exit("unexpected error while reading: %s (%d)\n", strerror(errno), errno);
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# In file included from io.c:12:0:
# error.h:1:6: note: expected 'char *' but argument is of type 'const char *'
# void error_exit(char *format, ...);
# ^~~~~~~~~~
# io.c:42:8: warning: conversion to 'long unsigned int' from 'ssize_t {aka long int}' may change the sign of the result [-Wsign-conversion]
# len -= rc;
# ^~
# io.c: In function 'WRITE':
# io.c:75:8: warning: conversion to 'long unsigned int' from 'ssize_t {aka long int}' may change the sign of the result [-Wsign-conversion]
# len -= rc;
# ^~
# io.c: In function 'phantom_write':
# io.c:111:18: warning: conversion to 'size_t {aka long unsigned int}' from 'off64_t {aka long int}' may change the sign of the result [-Wsign-conversion]
# move_a_little = 512 - (curpos & 511);
# ^~~
# io.c:126:14: warning: conversion to 'int' from 'ssize_t {aka long int}' may alter its value [-Wconversion]
# if ((rc = WRITE(fd, in, move_a_little)) <= 0)
# ^~~~~
# io.c:132:18: warning: conversion to 'size_t {aka long unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
# move_a_little -= rc;
# ^~
# io.c:163:15: warning: conversion to 'int' from 'ssize_t {aka long int}' may alter its value [-Wconversion]
# if ((rc = WRITE(fd, in, 512)) <= 0)
# ^~~~~
# io.c:172:14: warning: conversion to 'int' from 'ssize_t {aka long int}' may alter its value [-Wconversion]
# if ((rc = WRITE(fd, in, nbytes)) <= 0)
# ^~~~~
# io.c:181:10: warning: conversion to 'size_t {aka long unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
# nbytes -= rc;
# ^~
# cc -Wall -Wshadow -Wconversion -Wwrite-strings -Winline -O2 -DVERSION=\"0.20\" -c -o utils.o utils.c
# cc -Wall -Wshadow -Wconversion -Wwrite-strings -Winline -O2 -DVERSION=\"0.20\" -c -o error.o error.c
# utils.c: In function 'mymalloc':
# utils.c:21:14: warning: passing argument 1 of 'error_exit' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
# error_exit("failed to allocate %d bytes for %s\n", size, what);
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# In file included from utils.c:15:0:
# error.h:1:6: note: expected 'char *' but argument is of type 'const char *'
# void error_exit(char *format, ...);
# ^~~~~~~~~~
# utils.c: In function 'myrealloc':
# utils.c:30:14: warning: passing argument 1 of 'error_exit' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
# error_exit("failed to reallocate to %d bytes for %s\n", newsize, what);
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# In file included from utils.c:15:0:
# error.h:1:6: note: expected 'char *' but argument is of type 'const char *'
# void error_exit(char *format, ...);
# ^~~~~~~~~~
# utils.c: In function 'get_filesize':
# utils.c:40:14: warning: passing argument 1 of 'error_exit' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
# error_exit("Failed to retrieve length of file %s: %s (%d)\n", filename, strerror(errno), errno);
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# In file included from utils.c:15:0:
# error.h:1:6: note: expected 'char *' but argument is of type 'const char *'
# void error_exit(char *format, ...);
# ^~~~~~~~~~
# In file included from utils.c:13:0:
# utils.c: In function 'copy_block':
# gen.h:1:25: warning: conversion to 'size_t {aka long unsigned int}' from 'off64_t {aka long int}' may change the sign of the result [-Wsign-conversion]
# #define min(x, y) ((x)<(y)?(x):(y))
# ^
# utils.c:51:24: note: in expansion of macro 'min'
# size_t sector_size = min(block_size, 512);
# ^~~
# utils.c:56:37: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t {aka long unsigned int}' [-Wformat=]
# fprintf(stderr, "Failed to read %d bytes from inputfile: %s (%d)\n", sector_size, strerror(errno), errno);
# ^
# utils.c:68:14: warning: conversion to 'long unsigned int' from 'off64_t {aka long int}' may change the sign of the result [-Wsign-conversion]
# block_size -= sector_size;
# ^~
# utils.c:68:17: warning: conversion to 'off64_t {aka long int}' from 'long unsigned int' may change the sign of the result [-Wsign-conversion]
# block_size -= sector_size;
# ^~~~~~~~~~~
# utils.c: In function 'myseek':
# utils.c:78:14: warning: passing argument 1 of 'error_exit' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
# error_exit("Failed to seek in file to offset %lld: %s (%d)\n", offset, strerror(errno), errno);
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# In file included from utils.c:15:0:
# error.h:1:6: note: expected 'char *' but argument is of type 'const char *'
# void error_exit(char *format, ...);
# ^~~~~~~~~~
# cc -Wall -Wshadow -Wconversion -Wwrite-strings -Winline -O2 -DVERSION=\"0.20\" -c -o mergebad.o mergebad.c
# cc -Wall -W recoverdm.o dev.o io.o utils.o error.o -o recoverdm
# mergebad.c: In function 'find_image_without_badblock':
# mergebad.c:45:50: warning: format '%lld' expects argument of type 'long long int', but argument 4 has type 'off64_t {aka long int}' [-Wformat=]
# printf("> find_image_without_badblock(%p %d %lld)\n", imgs, n_imgs, offset);
# ^
# mergebad.c:59:25: warning: format '%lld' expects argument of type 'long long int', but argument 4 has type 'off64_t {aka long int}' [-Wformat=]
# printf("= %d/%d, %lld - %lld\n", img_index, badblock_index, cur_offset, cur_bb_end);
# ^
# mergebad.c:59:32: warning: format '%lld' expects argument of type 'long long int', but argument 5 has type 'off64_t {aka long int}' [-Wformat=]
# printf("= %d/%d, %lld - %lld\n", img_index, badblock_index, cur_offset, cur_bb_end);
# ^
# mergebad.c: In function 'find_smallest_current_badblock':
# mergebad.c:103:53: warning: format '%lld' expects argument of type 'long long int', but argument 4 has type 'off64_t {aka long int}' [-Wformat=]
# printf("> find_smallest_current_badblock(%p %d %lld %p %p)\n", imgs, n_imgs, offset, selected_image, selected_badblock);
# ^
# mergebad.c:118:25: warning: format '%lld' expects argument of type 'long long int', but argument 4 has type 'off64_t {aka long int}' [-Wformat=]
# printf("= %d/%d, %lld - %lld\n", img_index, badblock_index, cur_offset, cur_bb_end);
# ^
# mergebad.c:118:32: warning: format '%lld' expects argument of type 'long long int', but argument 5 has type 'off64_t {aka long int}' [-Wformat=]
# printf("= %d/%d, %lld - %lld\n", img_index, badblock_index, cur_offset, cur_bb_end);
# ^
# mergebad.c:130:33: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'off64_t {aka long int}' [-Wformat=]
# printf("= # bytes left: %lld\n", block_size_left);
# ^
# mergebad.c:148:55: warning: format '%lld' expects argument of type 'long long int', but argument 4 has type 'off64_t {aka long int}' [-Wformat=]
# printf("> find_smallest_current_badblock: %d %d (%lld)\n", *selected_image, *selected_badblock, smallest_block_size);
# ^
# mergebad.c: In function 'read_mapfile':
# mergebad.c:189:18: warning: format '%lld' expects argument of type 'long long int *', but argument 3 has type 'off64_t * {aka long int *}' [-Wformat=]
# fscanf(fh, "%lld %d", &offset, &block_size);
# ^
# mergebad.c:191:53: warning: conversion to 'long unsigned int' from 'int' may change the sign of the result [-Wsign-conversion]
# bbs = (badblock *)myrealloc(bbs, sizeof(badblock) * (n_bb + 1), "badblocks list");
# ^
# mergebad.c:191:67: warning: passing argument 3 of 'myrealloc' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
# bbs = (badblock *)myrealloc(bbs, sizeof(badblock) * (n_bb + 1), "badblocks list");
# ^~~~~~~~~~~~~~~~
# In file included from mergebad.c:14:0:
# utils.h:2:8: note: expected 'char *' but argument is of type 'const char *'
# void * myrealloc(void *oldp, size_t newsize, char *what);
# ^~~~~~~~~
# mergebad.c:196:19: warning: format '%lld' expects argument of type 'long long int', but argument 3 has type 'off64_t {aka long int}' [-Wformat=]
# printf("%d] %lld %lld\n", n_bb, offset, block_size);
# ^
# mergebad.c:196:24: warning: format '%lld' expects argument of type 'long long int', but argument 4 has type 'int' [-Wformat=]
# printf("%d] %lld %lld\n", n_bb, offset, block_size);
# ^
# mergebad.c: In function 'select_most_occuring_byte':
# mergebad.c:228:20: warning: conversion to 'char' from 'int' may alter its value [-Wconversion]
# selected_byte = loop;
# ^~~~
# mergebad.c:235:14: warning: passing argument 1 of 'error_exit' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
# error_exit("Internal error: no byte found!");
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# In file included from mergebad.c:15:0:
# error.h:1:6: note: expected 'char *' but argument is of type 'const char *'
# void error_exit(char *format, ...);
# ^~~~~~~~~~
# mergebad.c: In function 'main':
# mergebad.c:269:41: warning: conversion to 'long unsigned int' from 'int' may change the sign of the result [-Wsign-conversion]
# imgs = myrealloc(imgs, sizeof(image) * (n_imgs + 1), "image structure");
# ^
# mergebad.c:269:57: warning: passing argument 3 of 'myrealloc' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
# imgs = myrealloc(imgs, sizeof(image) * (n_imgs + 1), "image structure");
# ^~~~~~~~~~~~~~~~~
# In file included from mergebad.c:14:0:
# utils.h:2:8: note: expected 'char *' but argument is of type 'const char *'
# void * myrealloc(void *oldp, size_t newsize, char *what);
# ^~~~~~~~~
# mergebad.c:290:33: warning: format '%lld' expects argument of type 'long long int', but argument 3 has type 'off64_t {aka long int}' [-Wformat=]
# printf("Adding image: %s/%lld number of badblocks: %d\n", imgs[n_imgs].filename, imgs[n_imgs].size, imgs[n_imgs].bb_list_size);
# ^
# mergebad.c:318:29: warning: format '%d' expects argument of type 'int', but argument 2 has type 'off64_t {aka long int}' [-Wformat=]
# printf("Length set to: %d\n", length);
# ^
# mergebad.c:357:60: warning: format '%lld' expects argument of type 'long long int', but argument 3 has type 'off64_t {aka long int}' [-Wformat=]
# printf("No filelength given, using length of file %s: %lld\n", imgs[0].filename, (length = get_filesize(imgs[0].filename)));
# ^
# mergebad.c:365:31: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'off64_t {aka long int}' [-Wformat=]
# printf("Current offset: %lld\n", offset);
# ^
# mergebad.c:388:26: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'off64_t {aka long int}' [-Wformat=]
# printf("Will copy %lld bytes from file %s\n", n_bytes_to_copy, imgs[img_index].filename);
# ^
# mergebad.c:396:53: warning: format '%lld' expects argument of type 'long long int', but argument 3 has type 'off64_t {aka long int}' [-Wformat=]
# fprintf(stderr, "There was a problem copying %lld bytes of data from file %s to the outputfile: %s (%d)\n", n_bytes_to_copy, imgs[img_index].filename, strerror(errno), errno);
# ^
# mergebad.c:411:63: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'off64_t {aka long int}' [-Wformat=]
# printf("No image without badblocks for current offset (%lld) found: \"guessing\" one or more bytes.\n", offset);
# ^
# mergebad.c:413:44: warning: conversion to 'size_t {aka long unsigned int}' from 'int' may change the sign of the result [-Wsign-conversion]
# guess_bytes = (unsigned char *)mymalloc(n_imgs, "temp buffer for bytes from each image to select from");
# ^~~~~~
# mergebad.c:413:52: warning: passing argument 2 of 'mymalloc' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
# guess_bytes = (unsigned char *)mymalloc(n_imgs, "temp buffer for bytes from each image to select from");
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# In file included from mergebad.c:14:0:
# utils.h:1:8: note: expected 'char *' but argument is of type 'const char *'
# void * mymalloc(size_t size, char *what);
# ^~~~~~~~
# mergebad.c:419:16: warning: passing argument 1 of 'error_exit' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
# error_exit("Internal error: could not find the badblock \"we're in\".\n");
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# In file included from mergebad.c:15:0:
# error.h:1:6: note: expected 'char *' but argument is of type 'const char *'
# void error_exit(char *format, ...);
# ^~~~~~~~~~
# mergebad.c:431:30: warning: format '%lld' expects argument of type 'long long int', but argument 3 has type 'off64_t {aka long int}' [-Wformat=]
# fprintf(fh_map_file, "%lld %lld\n", offset, n_to_guess);
# ^
# mergebad.c:431:35: warning: format '%lld' expects argument of type 'long long int', but argument 4 has type 'off64_t {aka long int}' [-Wformat=]
# fprintf(fh_map_file, "%lld %lld\n", offset, n_to_guess);
# ^
# mergebad.c:437:29: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'off64_t {aka long int}' [-Wformat=]
# printf("\"Guessing\" %lld bytes\n", n_to_guess);
# ^
# mergebad.c:441:16: warning: passing argument 1 of 'error_exit' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
# error_exit("Number of \"bytes to guess\" less then 1!\n");
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# In file included from mergebad.c:15:0:
# error.h:1:6: note: expected 'char *' but argument is of type 'const char *'
# void error_exit(char *format, ...);
# ^~~~~~~~~~
# mergebad.c:449:29: warning: conversion to 'size_t {aka long unsigned int}' from 'off64_t {aka long int}' may change the sign of the result [-Wsign-conversion]
# output_buffer = mymalloc(n_to_guess, "guessed bytes");
# ^~~~~~~~~~
# mergebad.c:449:41: warning: passing argument 2 of 'mymalloc' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
# output_buffer = mymalloc(n_to_guess, "guessed bytes");
# ^~~~~~~~~~~~~~~
# In file included from mergebad.c:14:0:
# utils.h:1:8: note: expected 'char *' but argument is of type 'const char *'
# void * mymalloc(size_t size, char *what);
# ^~~~~~~~
# mergebad.c:472:45: warning: conversion to 'size_t {aka long unsigned int}' from 'off64_t {aka long int}' may change the sign of the result [-Wsign-conversion]
# if (phantom_write(fd_out, output_buffer, n_to_guess) != n_to_guess)
# ^~~~~~~~~~
# cc -Wall -W mergebad.o io.o utils.o error.o -o mergebad
# ==> Entering fakeroot environment...
# ==> Starting package()...
# ==> Tidying install...
# -> Removing doc files...
# -> Purging unwanted files...
# ==> Checking for packaging issue...
# ==> Creating package "recoverdm"...
# -> Generating .PKGINFO file...
# -> Generating .BUILDINFO file...
# error: invalid option '--noprogressbar'
# -> Generating .MTREE file...
# -> Compressing package...
# ==> Leaving fakeroot environment.
# ==> Finished making: recoverdm 0.20-4 (Wed Aug 24 13:26:30 UTC 2016)

CMD: pacman --query --file recoverdm-0.20-4-x86_64.pkg.tar.xz
# recoverdm 0.20-4

Creating hybrid package for 'recoverdm'

Trying to find vanilla package 'recoverdm'...

CMD: pacman --query --file /mirror/recoverdm-0.20-4.pkg.tar.xz
# recoverdm 0.20-4

Package file has the following structure:
# /.PKGINFO
# /.MTREE
# /usr/bin/mergebad
# /usr/bin/recoverdm

Generating .MTREE

CMD: bsdtar -czf .MTREE --format=mtree --options=!all,use-set,type,uid,mode,time,size,md5,sha256,link .PKGINFO usr

Tar-ing up files

CMD: bsdtar -cf - .PKGINFO usr .MTREE

CMD: xz -c -z

Successfully ran bsdtar -cf - .PKGINFO usr .MTREE | xz -c -z

CMD: bsdtar -tqf recoverdm.pkg.tar.xz .PKGINFO
# .PKGINFO

Created package at path /var/cache/pacman/pkg/recoverdm.pkg.tar.xz

Attempting to access local repository, attempt 1

CMD: repo-add /var/cache/pacman/pkg/tuscan.db.tar /var/cache/pacman/pkg/recoverdm.pkg.tar.xz
# ==> Extracting database to a temporary location...
# ==> Extracting database to a temporary location...
# ==> Adding package '/var/cache/pacman/pkg/recoverdm.pkg.tar.xz'
# -> Computing checksums...
# -> Creating 'desc' db entry...
# -> Creating 'files' db entry...
# ==> Creating updated database file '/var/cache/pacman/pkg/tuscan.db.tar'