ondrej-zary / carps-cups

CUPS driver for Canon CARPS printers
GNU General Public License v3.0
69 stars 22 forks source link

Failed to compile carps-cups #11

Closed shiriru closed 9 years ago

shiriru commented 9 years ago

I've installed all dependencies for compilation, cloned the source in ~/Downloads/carps-cups/ and ran $ make (not root) from inside the source dir. I've tried # make as well, and got same result.

I receive following output:

gcc -Wall -Wextra --std=c99 -O2 carps-decode.c -o carps-decode
carps-decode.c: In function ‘decode_print_data’:
carps-decode.c:319:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘long int’ [-Wformat=]
   printf("out_pos: 0x%x, line_num=%d, line_pos=%d (%d), len=%d, in_pos=0x%x ", out_bytes, line_num, line_pos, line_pos * 8, len, block_pos + data - start);
   ^
carps-decode.c: In function ‘get_block’:
carps-decode.c:65:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
   fread(data, 1, 1, f); /* discard the first 0x01 byte */
        ^
gcc -Wall -Wextra --std=c99 -O2 rastertocarps.c -o rastertocarps -lcupsimage -lcups
rastertocarps.c: In function ‘encode_print_data’:
rastertocarps.c:290:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
    fread(cur_line, 1, line_len_file, f);
         ^
rastertocarps.c: In function ‘main’:
rastertocarps.c:551:8: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
   fgets(tmp, sizeof(tmp), f);
        ^
rastertocarps.c:557:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
    fgets(tmp, sizeof(tmp), f);
         ^
ppdc carps.drv

I am running Linux 3.16.0-46-generic #62~14.04.1-Ubuntu:amd64.

I cannon debug this, so could you, please, advice what I am doing wrong and how to solve this?

ondrej-zary commented 9 years ago

You got only some warnings, no error.