logo

utils

~/.local/bin tools and git-hooks git clone https://hacktivis.me/git/utils.git
commit: ea1f9ff778845d96752e094251c383a56e68ca89
parent 65bb300cbf473e165025adbbfdcd0873a58e3b23
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri,  9 Jul 2021 02:58:52 +0200

bin/xcd: Fix compiler warnings

Diffstat:

Mbin/xcd.c8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/xcd.c b/bin/xcd.c @@ -47,7 +47,7 @@ print_hex_rgb(unsigned char c) } void -print_plain_rgb(unsigned char *line, size_t len) +print_plain_rgb(char *line, size_t len) { unsigned char c; @@ -87,7 +87,7 @@ concat(FILE *stream) { if(cols >= WIDTH) { - print_plain_rgb(&line, (size_t)cols); + print_plain_rgb(line, (size_t)cols); memset(&line, 0, WIDTH); pos_rgb = rgb_char(bytes); @@ -108,7 +108,7 @@ concat(FILE *stream) printf(" "); LANODAN_XCD_RESET - print_plain_rgb(&line, (size_t)cols); + print_plain_rgb(line, (size_t)cols); pos_rgb = rgb_char(bytes); printf("\n[38;2;%d;%d;%dm%06x\n", pos_rgb.red, pos_rgb.green, pos_rgb.blue, bytes); @@ -128,7 +128,7 @@ main(int argc, char *argv[]) } else { - for(int argi = 1; err == 0, argi < argc; argi++) + for(int argi = 1; (err == 0) && (argi < argc); argi++) { if(strncmp(argv[argi], "-", 2) == 0) {