Attempted compile on Linux 64 bit (Mageia release 6), with cmake v3.7.2 and ninja v1.7.2
cmake completed without errors displayed
The following is the output during compile with ninja.
(The constant MAX_PATH used was not defined when first used.
There are a number of other errors.)
build $ ninja
[1/3] Building C object CMakeFiles/pak.dir/main.c.o
FAILED: CMakeFiles/pak.dir/main.c.o
/usr/bin/cc -O3 -Os -pipe -Wall -Wextra -fmerge-all-constants -Wl,--gc-sections,--build-id=none -s -MD -MT CMakeFiles/pak.dir/main.c.o -MF CMakeFiles/pak.dir/main.c.o.d -o CMakeFiles/pak.dir/main.c.o -c /pdev/dev/chrome-pak-customizer/main.c
/pdev/dev/chrome-pak-customizer/main.c: Dans la fonction ‘printHelp’:
/pdev/dev/chrome-pak-customizer/main.c:21:19: erreur : ‘MAX_PATH’ undeclared (first use in this function)
char selfName[MAX_PATH];
^
/pdev/dev/chrome-pak-customizer/main.c:21:19: note : each undeclared identifier is reported only once for each function it appears in
/pdev/dev/chrome-pak-customizer/main.c:22:5: attention : implicit declaration of function ‘GetModuleFileName’ [-Wimplicit-function-declaration]
GetModuleFileName(NULL, selfName, MAX_PATH);
^
/pdev/dev/chrome-pak-customizer/main.c:21:10: attention : unused variable ‘selfName’ [-Wunused-variable]
char selfName[MAX_PATH];
^
/pdev/dev/chrome-pak-customizer/main.c: Dans la fonction ‘main’:
/pdev/dev/chrome-pak-customizer/main.c:124:16: erreur : ‘PATH_MAX’ undeclared (first use in this function)
char path1[PATH_MAX];
^
/pdev/dev/chrome-pak-customizer/main.c:126:10: attention : unused variable ‘path2’ [-Wunused-variable]
char path2[PATH_MAX];
^
/pdev/dev/chrome-pak-customizer/main.c:124:10: attention : unused variable ‘path1’ [-Wunused-variable]
char path1[PATH_MAX];
^
[2/3] Building C object CMakeFiles/pak.dir/pak_pack.c.o
FAILED: CMakeFiles/pak.dir/pak_pack.c.o
/usr/bin/cc -O3 -Os -pipe -Wall -Wextra -fmerge-all-constants -Wl,--gc-sections,--build-id=none -s -MD -MT CMakeFiles/pak.dir/pak_pack.c.o -MF CMakeFiles/pak.dir/pak_pack.c.o.d -o CMakeFiles/pak.dir/pak_pack.c.o -c /pdev/dev/chrome-pak-customizer/pak_pack.c
/pdev/dev/chrome-pak-customizer/pak_pack.c: Dans la fonction ‘pakUnpack’:
/pdev/dev/chrome-pak-customizer/pak_pack.c:14:18: erreur : ‘PATH_MAX’ undeclared (first use in this function)
char pathBuf[PATH_MAX];
^
/pdev/dev/chrome-pak-customizer/pak_pack.c:14:18: note : each undeclared identifier is reported only once for each function it appears in
In file included from /pdev/dev/chrome-pak-customizer/pak_pack.h:16:0,
from /pdev/dev/chrome-pak-customizer/pak_pack.c:1:
/pdev/dev/chrome-pak-customizer/pak_defs.h:86:30: attention : format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘uint_fast32_t {alias long unsigned int}’ [-Wformat=]
define PAK_INDEX_GLOBAL_TAG "[Global]"
^
/pdev/dev/chrome-pak-customizer/pak_pack.c:30:39: note : in expansion of macro ‘PAK_INDEX_GLOBAL_TAG’
sprintf(pakIndexStr + offset, PAK_INDEX_GLOBAL_TAG "\r\nversion=%u\r\n",
^
/pdev/dev/chrome-pak-customizer/pak_pack.c:36:30: attention : format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘uint_fast16_t {alias long unsigned int}’ [-Wformat=]
sprintf(fileNameBuf, "%u%s", files[i].id, pakGetFileType(files[i]));
^
/pdev/dev/chrome-pak-customizer/pak_pack.c:37:49: attention : format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘uint_fast16_t {alias long unsigned int}’ [-Wformat=]
offset += sprintf(pakIndexStr + offset, "%u=%s\r\n", files[i].id,
^
/pdev/dev/chrome-pak-customizer/pak_pack.c:14:10: attention : unused variable ‘pathBuf’ [-Wunused-variable]
char pathBuf[PATH_MAX];
^
/pdev/dev/chrome-pak-customizer/pak_pack.c: Dans la fonction ‘pakPack’:
/pdev/dev/chrome-pak-customizer/pak_pack.c:93:34: attention : format ‘%u’ expects argument of type ‘unsigned int ’, but argument 3 has type ‘uint_fast32_t {alias long unsigned int *}’ [-Wformat=]
sscanf(pakIndexBuf + offset, " version=%u%n", &myHeader.version, &count);
^
/pdev/dev/chrome-pak-customizer/pak_pack.c:134:18: erreur : ‘PATH_MAX’ undeclared (first use in this function)
char pathBuf[PATH_MAX];
^
/pdev/dev/chrome-pak-customizer/pak_pack.c:180:12: attention : format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘uint_fast32_t {alias long unsigned int}’ [-Wformat=]
printf("\nresource_count=%u\nalias_count=%u\n", myHeader.resource_count,
^
/pdev/dev/chrome-pak-customizer/pak_pack.c:180:12: attention : format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘uint_fast16_t {alias long unsigned int}’ [-Wformat=]
/pdev/dev/chrome-pak-customizer/pak_pack.c:182:12: attention : format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘uint_fast32_t {alias long unsigned int}’ [-Wformat=]
printf("version=%u\nencoding=%u\n", myHeader.version, myHeader.encoding);
^
/pdev/dev/chrome-pak-customizer/pak_pack.c:183:12: attention : format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘uint_fast32_t {alias long unsigned int}’ [-Wformat=]
printf("\npak size: %u\n", pakFile.size);
^
/pdev/dev/chrome-pak-customizer/pak_pack.c:134:10: attention : unused variable ‘pathBuf’ [-Wunused-variable]
char pathBuf[PATH_MAX];
^
ninja: build stopped: subcommand failed.
Attempted compile on Linux 64 bit (Mageia release 6), with cmake v3.7.2 and ninja v1.7.2 cmake completed without errors displayed The following is the output during compile with ninja. (The constant MAX_PATH used was not defined when first used. There are a number of other errors.)
build $ ninja [1/3] Building C object CMakeFiles/pak.dir/main.c.o FAILED: CMakeFiles/pak.dir/main.c.o /usr/bin/cc -O3 -Os -pipe -Wall -Wextra -fmerge-all-constants -Wl,--gc-sections,--build-id=none -s -MD -MT CMakeFiles/pak.dir/main.c.o -MF CMakeFiles/pak.dir/main.c.o.d -o CMakeFiles/pak.dir/main.c.o -c /pdev/dev/chrome-pak-customizer/main.c /pdev/dev/chrome-pak-customizer/main.c: Dans la fonction ‘printHelp’: /pdev/dev/chrome-pak-customizer/main.c:21:19: erreur : ‘MAX_PATH’ undeclared (first use in this function) char selfName[MAX_PATH]; ^ /pdev/dev/chrome-pak-customizer/main.c:21:19: note : each undeclared identifier is reported only once for each function it appears in /pdev/dev/chrome-pak-customizer/main.c:22:5: attention : implicit declaration of function ‘GetModuleFileName’ [-Wimplicit-function-declaration] GetModuleFileName(NULL, selfName, MAX_PATH); ^ /pdev/dev/chrome-pak-customizer/main.c:21:10: attention : unused variable ‘selfName’ [-Wunused-variable] char selfName[MAX_PATH]; ^ /pdev/dev/chrome-pak-customizer/main.c: Dans la fonction ‘main’: /pdev/dev/chrome-pak-customizer/main.c:124:16: erreur : ‘PATH_MAX’ undeclared (first use in this function) char path1[PATH_MAX]; ^ /pdev/dev/chrome-pak-customizer/main.c:126:10: attention : unused variable ‘path2’ [-Wunused-variable] char path2[PATH_MAX]; ^ /pdev/dev/chrome-pak-customizer/main.c:124:10: attention : unused variable ‘path1’ [-Wunused-variable] char path1[PATH_MAX]; ^ [2/3] Building C object CMakeFiles/pak.dir/pak_pack.c.o FAILED: CMakeFiles/pak.dir/pak_pack.c.o /usr/bin/cc -O3 -Os -pipe -Wall -Wextra -fmerge-all-constants -Wl,--gc-sections,--build-id=none -s -MD -MT CMakeFiles/pak.dir/pak_pack.c.o -MF CMakeFiles/pak.dir/pak_pack.c.o.d -o CMakeFiles/pak.dir/pak_pack.c.o -c /pdev/dev/chrome-pak-customizer/pak_pack.c /pdev/dev/chrome-pak-customizer/pak_pack.c: Dans la fonction ‘pakUnpack’: /pdev/dev/chrome-pak-customizer/pak_pack.c:14:18: erreur : ‘PATH_MAX’ undeclared (first use in this function) char pathBuf[PATH_MAX]; ^ /pdev/dev/chrome-pak-customizer/pak_pack.c:14:18: note : each undeclared identifier is reported only once for each function it appears in In file included from /pdev/dev/chrome-pak-customizer/pak_pack.h:16:0, from /pdev/dev/chrome-pak-customizer/pak_pack.c:1: /pdev/dev/chrome-pak-customizer/pak_defs.h:86:30: attention : format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘uint_fast32_t {alias long unsigned int}’ [-Wformat=]
define PAK_INDEX_GLOBAL_TAG "[Global]"
/pdev/dev/chrome-pak-customizer/pak_pack.c:30:39: note : in expansion of macro ‘PAK_INDEX_GLOBAL_TAG’ sprintf(pakIndexStr + offset, PAK_INDEX_GLOBAL_TAG "\r\nversion=%u\r\n", ^ /pdev/dev/chrome-pak-customizer/pak_pack.c:36:30: attention : format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘uint_fast16_t {alias long unsigned int}’ [-Wformat=] sprintf(fileNameBuf, "%u%s", files[i].id, pakGetFileType(files[i])); ^ /pdev/dev/chrome-pak-customizer/pak_pack.c:37:49: attention : format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘uint_fast16_t {alias long unsigned int}’ [-Wformat=] offset += sprintf(pakIndexStr + offset, "%u=%s\r\n", files[i].id, ^ /pdev/dev/chrome-pak-customizer/pak_pack.c:14:10: attention : unused variable ‘pathBuf’ [-Wunused-variable] char pathBuf[PATH_MAX]; ^ /pdev/dev/chrome-pak-customizer/pak_pack.c: Dans la fonction ‘pakPack’: /pdev/dev/chrome-pak-customizer/pak_pack.c:93:34: attention : format ‘%u’ expects argument of type ‘unsigned int ’, but argument 3 has type ‘uint_fast32_t {alias long unsigned int *}’ [-Wformat=] sscanf(pakIndexBuf + offset, " version=%u%n", &myHeader.version, &count); ^ /pdev/dev/chrome-pak-customizer/pak_pack.c:134:18: erreur : ‘PATH_MAX’ undeclared (first use in this function) char pathBuf[PATH_MAX]; ^ /pdev/dev/chrome-pak-customizer/pak_pack.c:180:12: attention : format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘uint_fast32_t {alias long unsigned int}’ [-Wformat=] printf("\nresource_count=%u\nalias_count=%u\n", myHeader.resource_count, ^ /pdev/dev/chrome-pak-customizer/pak_pack.c:180:12: attention : format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘uint_fast16_t {alias long unsigned int}’ [-Wformat=] /pdev/dev/chrome-pak-customizer/pak_pack.c:182:12: attention : format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘uint_fast32_t {alias long unsigned int}’ [-Wformat=] printf("version=%u\nencoding=%u\n", myHeader.version, myHeader.encoding); ^ /pdev/dev/chrome-pak-customizer/pak_pack.c:183:12: attention : format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘uint_fast32_t {alias long unsigned int}’ [-Wformat=] printf("\npak size: %u\n", pakFile.size); ^ /pdev/dev/chrome-pak-customizer/pak_pack.c:134:10: attention : unused variable ‘pathBuf’ [-Wunused-variable] char pathBuf[PATH_MAX]; ^ ninja: build stopped: subcommand failed.