clang -DHAVE_CONFIG_H -Weverything -Wno-padded -Wno-reserved-id-macro -Wno-disabled-macro-expansion -Wno-missing-prototypes -Wno-cast-qual -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -DSYSCONFDIR=\"/usr/local/etc\" -I../lib *.c ../lib/libgnu.a -o nano -O2 -lncursesw -lz -L/usr/local/opt/ncurses/lib -I/usr/local/opt/ncurses/include &> errors.txt browser.c:128:39: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] selected = selected - selected % (editwinrows * width) + ^~~~~~~~~~~ ~ browser.c:129:10: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] (mouse_y * width) + (mouse_x / (longest + 2)); ^~~~~~~ ~ browser.c:129:30: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] (mouse_y * width) + (mouse_x / (longest + 2)); ^~~~~~~ ~ browser.c:197:29: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] selected = ((selected / (editwinrows * width)) * ^~~~~~~~~~~ ~ browser.c:198:9: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] editwinrows * width) + selected % width; ^~~~~~~~~~~ browser.c:200:29: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] selected = ((selected / (editwinrows * width)) * ^~~~~~~~~~~ ~ browser.c:201:9: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] editwinrows * width) + selected % width + ^~~~~~~~~~~ browser.c:202:9: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] editwinrows * width - width; ^~~~~~~~~~~ ~ browser.c:210:24: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] else if (selected < editwinrows * width) ^~~~~~~~~~~ ~ browser.c:213:17: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] selected -= editwinrows * width; ^~~~~~~~~~~ ~ browser.c:217:24: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] else if (selected + editwinrows * width >= filelist_len) ^~~~~~~~~~~ ~ browser.c:218:28: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] selected = (selected + editwinrows * width - filelist_len) % ^~~~~~~~~~~ ~ browser.c:221:17: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] selected += editwinrows * width; ^~~~~~~~~~~ ~ browser.c:133:17: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] if (mouse_x > width * (longest + 2)) ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~ browser.c:66:22: warning: variable 'dir' may be uninitialized when used here [-Wconditional-uninitialized] if (path == NULL || dir == NULL) { ^~~ browser.c:55:10: note: initialize the variable 'dir' to silence this warning DIR *dir; ^ = NULL browser.c:422:13: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] longest = COLS; ~ ^~~~ browser.c:458:16: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] width = (COLS + 2) / (longest + 2); ~~~~~^~~ ~ browser.c:421:14: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare] if (longest > COLS) ~~~~~~~ ^ ~~~~ browser.c:518:29: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] i = selected - selected % (editwinrows * width); ^~~~~~~~~~~ ~ browser.c:610:24: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] mvwaddstr(edit, row, col - infolen, info); ^~~ ~ /usr/local/opt/ncurses/include/ncursesw/curses.h:1297:51: note: expanded from macro 'mvwaddstr' #define mvwaddstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),-1)) ^ browser.c:623:13: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] if (col > COLS - longest) { ^~~~ ~ browser.c:547:29: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] blank_row(edit, row, col, longest); ~~~~~~~~~ ^~~~~~~ browser.c:610:28: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] mvwaddstr(edit, row, col - infolen, info); ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/local/opt/ncurses/include/ncursesw/curses.h:1297:51: note: expanded from macro 'mvwaddstr' #define mvwaddstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),-1)) ~~~~~ ^ browser.c:623:11: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] if (col > COLS - longest) { ~~~ ^ ~~~~~~~~~~~~~~ browser.c:672:52: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] char *disp = display_string(last_search, 0, COLS / 3, FALSE); ~~~~~~~~~~~~~~ ~~~~~^~~ browser.c:677:28: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare] (strlenpt(last_search) > COLS / 3) ? "..." : ""); ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~ /usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^~~~~~~~~~~ 26 warnings generated. chars.c:336:13: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] *col += tabsize - *col % tabsize; ^~~~~~~ ~ chars.c:336:30: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] *col += tabsize - *col % tabsize; ~ ^~~~~~~ chars.c:343:13: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] *col += mbwidth(buf); ~~ ^~~~~~~~~~~~ chars.c:359:13: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] *col += tabsize - *col % tabsize; ^~~~~~~ ~ chars.c:359:30: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] *col += tabsize - *col % tabsize; ~ ^~~~~~~ chars.c:402:15: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] char_len = parse_mbchar(buf + before, NULL, NULL); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ chars.c:416:15: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] return pos + parse_mbchar(buf + pos, NULL, NULL); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ chars.c:552:55: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] pointer = haystack + move_mbleft(haystack, pointer - haystack); ~~~~~~~~~~~ ~~~~~~~~^~~~~~~~~~ chars.c:602:28: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] if (mbtowc(&ws, symbol, sym_len) < 0) { ~~~~~~ ^~~~~~~ chars.c:670:47: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] pointer = head + move_mbleft(head, pointer - head); ~~~~~~~~~~~ ~~~~~~~~^~~~~~ chars.c:681:47: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] pointer = head + move_mbleft(head, pointer - head); ~~~~~~~~~~~ ~~~~~~~~^~~~~~ 11 warnings generated. color.c:67:16: warning: implicit conversion loses integer precision: 'unsigned long' to 'short' [-Wconversion] init_pair(i + 1, combo->fg, combo->bg); ~~~~~~~~~ ~~^~~ color.c:74:17: warning: implicit conversion loses integer precision: 'unsigned long' to 'short' [-Wconversion] init_pair(i + 1, COLOR_WHITE, COLOR_RED); ~~~~~~~~~ ~~^~~ color.c:134:18: warning: implicit conversion loses integer precision: 'const int' to 'short' [-Wconversion] init_pair(ink->pairnum, foreground, background); ~~~~~~~~~ ~~~~~^~~~~~~ color.c:339:59: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] fileptr->multidata = (short *)nmalloc(openfile->syntax->nmultis * sizeof(short)); ~~~~~~~~~~~~~~~~~~^~~~~~~ ~ color.c:398:40: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] index = move_mbright(line->data, index); ~~~~~~~~~~~~ ^~~~~ color.c:398:15: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] index = move_mbright(line->data, index); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ color.c:430:22: warning: implicit conversion loses integer precision: 'regoff_t' (aka 'long') to 'int' [-Wshorten-64-to-32] index = endmatch.rm_eo; ~ ~~~~~~~~~^~~~~ 7 warnings generated. cut.c:39:9: warning: static variable 'keep_cutbuffer' is used in an inline function with external linkage [-Wstatic-in-inline] return keep_cutbuffer; ^ ./proto.h:255:1: note: use 'static' to give inline function 'keeping_cutbuffer' internal linkage bool keeping_cutbuffer(void); ^ static /usr/local/Cellar/llvm/6.0.0/lib/clang/6.0.0/include/stdbool.h:31:14: note: expanded from macro 'bool' #define bool _Bool ^ cut.c:27:13: note: 'keep_cutbuffer' declared here static bool keep_cutbuffer = FALSE; ^ cut.c:277:28: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] if (less_than_a_screenful(was_lineno, was_leftedge)) ~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~ 2 warnings generated. files.c:248:23: warning: implicit conversion loses integer precision: 'int' to 'char' [-Wconversion] lockdata[24] = mypid % 256; ~ ~~~~~~^~~~~ files.c:249:31: warning: implicit conversion loses integer precision: 'int' to 'char' [-Wconversion] lockdata[25] = (mypid / 256) % 256; ~ ~~~~~~~~~~~~~~^~~~~ files.c:250:39: warning: implicit conversion loses integer precision: 'int' to 'char' [-Wconversion] lockdata[26] = (mypid / (256 * 256)) % 256; ~ ~~~~~~~~~~~~~~~~~~~~~~^~~~~ files.c:329:14: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] readamt = read(lockfd, &lockbuf[readtot], LOCKBUFSIZE - readtot); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ files.c:356:10: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] room = COLS - strlenpt(question) + 7 - strlenpt(lockuser) - ^~~~ ~ files.c:362:30: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] strlenpt(filename) - room + 3, room, FALSE); ~ ^~~~ files.c:362:40: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] strlenpt(filename) - room + 3, room, FALSE); ^~~~ files.c:368:45: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] postedname = display_string(filename, 0, room, FALSE); ~~~~~~~~~~~~~~ ^~~~ files.c:373:22: warning: format string is not a string literal [-Wformat-nonliteral] sprintf(promptstr, question, postedname, lockuser, lockprog, pidstring); ^~~~~~~~ /usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^~~~~~~~~~~ files.c:357:28: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] strlenpt(lockprog) - strlenpt(pidstring); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ files.c:360:17: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare] else if (room < strlenpt(filename)) { ~~~~ ^ ~~~~~~~~~~~~~~~~~~ files.c:482:13: warning: variable 'f' may be uninitialized when used here [-Wconditional-uninitialized] read_file(f, rc, realname, !new_buffer); ^ files.c:419:9: note: initialize the variable 'f' to silence this warning FILE *f; ^ = NULL files.c:652:46: warning: implicit conversion changes signedness: 'unsigned long' to 'ssize_t' (aka 'long') [-Wsign-conversion] openfile->current->lineno, xplustabs() + 1); ~~~~~~~~~~~~^~~ files.c:910:40: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] if (undoable && less_than_a_screenful(was_lineno, was_leftedge)) ~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~ files.c:2194:11: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] COLS - strlenpt(question) + 1, FALSE); ^~~~ ~ files.c:2198:23: warning: format string is not a string literal [-Wformat-nonliteral] sprintf(message, question, name); ^~~~~~~~ /usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^~~~~~~~~~~ files.c:2551:68: warning: operand of ? changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] size_t lastslash_len = (lastslash == NULL) ? 0 : lastslash - buf + 1; ~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~^~~ files.c:2562:47: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] if (len1 != len2 || strncmp(char1, char2, len2) != 0) ~~~~~~~ ^~~~ files.c:2569:18: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] common_len += len1; ~~ ^~~~ files.c:2621:25: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] longest_name = COLS - 1; ~ ~~~~~^~~ files.c:2626:18: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] ncols = (COLS + 1) / (longest_name + 2); ~~~~~^~~ ~ files.c:2620:21: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare] if (longest_name > COLS - 1) ~~~~~~~~~~~~ ^ ~~~~~~~~ files.c:2637:46: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] wmove(edit, editline, (longest_name + 2) * (match % ncols)); ~~~~~ ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 23 warnings generated. global.c:197:11: warning: no previous extern declaration for non-static variable 'tailfunc' [-Wmissing-variable-declarations] subnfunc *tailfunc; ^ 1 warning generated. help.c:42:7: warning: no previous extern declaration for non-static variable 'tempfilename' [-Wmissing-variable-declarations] char *tempfilename = NULL; ^ help.c:63:29: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] fwrite(ptr, sizeof(char), length, tempfile); ~~~~~~ ^~~~~~ help.c:61:16: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] int length = help_line_len(ptr); ~~~~~~ ^~~~~~~~~~~~~~~~~~ help.c:168:20: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] title = charalloc(length * sizeof(char) + 1); ^~~~~~ ~ ./nano.h:63:45: note: expanded from macro 'charalloc' #define charalloc(howmuch) (char *)nmalloc((howmuch) * sizeof(char)) ^~~~~~~ help.c:167:11: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32] length = break_line(help_text, MAX_BUF_SIZE, TRUE); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help.c:605:45: warning: operand of ? changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] size_t wrapping_point = (COLS > 24) ? COLS - 1 : 24; ~~~~~~~~~~~~~~ ~~~~~^~~ help.c:616:34: warning: implicit conversion changes signedness: 'size_t' (aka 'unsigned long') to 'ssize_t' (aka 'long') [-Wsign-conversion] wrap_location = break_line(ptr, wrapping_point, TRUE); ~~~~~~~~~~ ^~~~~~~~~~~~~~ help.c:626:10: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] return wrap_location; ~~~~~~ ^~~~~~~~~~~~~ 8 warnings generated. history.c:237:19: warning: format string is not a string literal [-Wformat-nonliteral] vfprintf(stderr, _(msg), ap); ^ ~~~ ./nano.h:109:19: note: expanded from macro '_' #define _(string) (string) ^~~~~~~ history.c:327:20: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] unsunder(line, read); ~~~~~~~~ ^~~~ history.c:418:19: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] unsunder(line, read); ~~~~~~~~ ^~~~ 3 warnings generated. move.c:55:29: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] size_t shim = editwincols * (1 + (tabsize / editwincols)); ~~~~ ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ move.c:58:65: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] *target_column = (openfile->placewewant + shim - *leftedge) % editwincols; ~ ^~~~~~~~~~~ move.c:79:27: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] (!forward && column / tabsize == (*leftedge - 1) / tabsize && ~ ^~~~~~~ move.c:79:56: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] (!forward && column / tabsize == (*leftedge - 1) / tabsize && ~ ^~~~~~~ move.c:80:14: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] column / tabsize < (*leftedge + editwincols - 1) / tabsize))) { ~ ^~~~~~~ move.c:80:37: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] column / tabsize < (*leftedge + editwincols - 1) / tabsize))) { ~ ^~~~~~~~~~~ move.c:80:56: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] column / tabsize < (*leftedge + editwincols - 1) / tabsize))) { ~ ^~~~~~~ 7 warnings generated. nano.c:576:80: warning: implicit conversion changes signedness: 'unsigned long' to 'ssize_t' (aka 'long') [-Wsign-conversion] update_poshistory(openfile->filename, openfile->current->lineno, xplustabs() + 1); ~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~^~~ nano.c:559:1: warning: function 'finish' could be declared with attribute 'noreturn' [-Wmissing-noreturn] { ^ nano.c:630:19: warning: format string is not a string literal [-Wformat-nonliteral] vfprintf(stderr, msg, ap); ^~~ nano.c:623:5: warning: indirection of non-volatile null pointer will be deleted, not trap [-Wnull-dereference] *(int*)0 = 0; ^~~~~~~~ nano.c:623:5: note: consider using __builtin_trap() or qualifying pointer with 'volatile' nano.c:613:1: warning: function 'die' could be declared with attribute 'noreturn' [-Wmissing-noreturn] { ^ nano.c:1125:28: warning: unused parameter 'signal' [-Wunused-parameter] RETSIGTYPE make_a_note(int signal) ^ nano.c:1257:31: warning: unused parameter 'signal' [-Wunused-parameter] RETSIGTYPE handle_hupterm(int signal) ^ nano.c:1263:29: warning: unused parameter 'signal' [-Wunused-parameter] RETSIGTYPE handle_crash(int signal) ^ nano.c:1269:27: warning: unused parameter 'signal' [-Wunused-parameter] RETSIGTYPE do_suspend(int signal) ^ nano.c:1304:28: warning: unused parameter 'signal' [-Wunused-parameter] RETSIGTYPE do_continue(int signal) ^ nano.c:1324:32: warning: unused parameter 'signal' [-Wunused-parameter] RETSIGTYPE handle_sigwinch(int signal) ^ nano.c:1406:9: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] TOGGLE(flag); ~~~~~~~^~~~~ ./nano.h:60:28: note: expanded from macro 'TOGGLE' #define TOGGLE(flag) FLAGS(flag) ^= FLAGMASK(flag) ~~~~~~^~~~~ ./nano.h:55:29: note: expanded from macro 'FLAGS' #define FLAGS(flag) flags[((flag) / (sizeof(unsigned) * 8))] ^~~~ ~ nano.c:1406:9: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] TOGGLE(flag); ~~~~~~~^~~~~ ./nano.h:60:46: note: expanded from macro 'TOGGLE' #define TOGGLE(flag) FLAGS(flag) ^= FLAGMASK(flag) ~~~~~~~~~^~~~~ ./nano.h:56:42: note: expanded from macro 'FLAGMASK' #define FLAGMASK(flag) ((unsigned)1 << ((flag) % (sizeof(unsigned) * 8))) ^~~~ ~ nano.c:1437:18: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] enabled = ISSET(flag); ~~~~~~^~~~~ ./nano.h:59:29: note: expanded from macro 'ISSET' #define ISSET(flag) ((FLAGS(flag) & FLAGMASK(flag)) != 0) ~~~~~~^~~~~ ./nano.h:55:29: note: expanded from macro 'FLAGS' #define FLAGS(flag) flags[((flag) / (sizeof(unsigned) * 8))] ^~~~ ~ nano.c:1437:18: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] enabled = ISSET(flag); ~~~~~~^~~~~ ./nano.h:59:46: note: expanded from macro 'ISSET' #define ISSET(flag) ((FLAGS(flag) & FLAGMASK(flag)) != 0) ~~~~~~~~~^~~~~ ./nano.h:56:42: note: expanded from macro 'FLAGMASK' #define FLAGMASK(flag) ((unsigned)1 << ((flag) % (sizeof(unsigned) * 8))) ^~~~ ~ nano.c:1455:18: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] term.c_lflag &= ~IEXTEN; ~~ ^~~~~~~ nano.c:1456:18: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] term.c_oflag &= ~OPOST; ~~ ^~~~~~ nano.c:1469:18: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] term.c_lflag &= ~ISIG; ~~ ^~~~~ nano.c:1497:18: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] term.c_iflag &= ~IXON; ~~ ^~~~~ nano.c:1620:38: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] actual_last_column(leftedge, click_col)); ~~~~~~~~~~~~~~~~~~ ^~~~~~~~~ nano.c:1615:19: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32] go_back_chunks(-row_count, &openfile->current, &leftedge); ~~~~~~~~~~~~~~ ^~~~~~~~~~ nano.c:1617:22: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32] go_forward_chunks(row_count, &openfile->current, &leftedge); ~~~~~~~~~~~~~~~~~ ^~~~~~~~~ nano.c:1872:8: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] i += char_len; ~~ ^~~~~~~~ nano.c:1880:25: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] current_len + char_len + 1); ~ ^~~~~~~~ ./nano.h:64:57: note: expanded from macro 'charealloc' #define charealloc(ptr, howmuch) (char *)nrealloc(ptr, (howmuch) * sizeof(char)) ^~~~~~~ nano.c:1886:18: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] current_len += char_len; ~~ ^~~~~~~~ nano.c:1896:24: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] openfile->mark_x += char_len; ~~ ^~~~~~~~ nano.c:1908:26: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] openfile->current_x += char_len; ~~ ^~~~~~~~ 27 warnings generated. prompt.c:46:33: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] statusbar_xplustabs()) + click_col - start_col); ~ ^~~~~~~~~ prompt.c:43:35: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare] if (click_row == 0 && click_col >= start_col) { ~~~~~~~~~ ^ ~~~~~~~~~ prompt.c:203:14: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] char_len = parse_mbchar(output + j, onechar, NULL); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ prompt.c:273:38: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] strlen(answer) - statusbar_x - char_len + 1); ~ ^~~~~~~~ ./nano.h:65:52: note: expanded from macro 'charmove' #define charmove(dest, src, n) memmove(dest, src, (n) * sizeof(char)) ^ /usr/include/secure/_string.h:71:39: note: expanded from macro 'memmove' __builtin___memmove_chk (dest, src, len, __darwin_obsz0 (dest)) ^~~ prompt.c:382:53: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] return column - base - 1 - (column - base - 1) % (COLS - base - 2); ^~~~ ~ prompt.c:379:31: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare] if (column == base || column < COLS - 1) ~~~~~~ ^ ~~~~~~~~ prompt.c:381:16: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] else if (COLS > base + 2) ~~~~ ^ ~~~~~~~~ prompt.c:411:46: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] expanded = display_string(answer, the_page, COLS - base - 1, FALSE); ^~~~ ~ prompt.c:425:29: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] wmove(bottomwin, 0, column - get_statusbar_page_start(base, column)); ~~~~~ ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ prompt.c:615:41: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] prompt = charalloc((COLS * MAXCHARLEN) + 1); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ ./nano.h:63:45: note: expanded from macro 'charalloc' #define charalloc(howmuch) (char *)nmalloc((howmuch) * sizeof(char)) ^~~~~~~ ~ prompt.c:617:39: warning: format string is not a string literal [-Wformat-nonliteral] vsnprintf(prompt, COLS * MAXCHARLEN, msg, ap); ^~~ prompt.c:620:48: warning: operand of ? changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] prompt[actual_x(prompt, (COLS < 5) ? 0 : COLS - 5)] = '\0'; ~~~~~~~~ ~~~~~^~~ prompt.c:709:55: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] mvwaddnstr(bottomwin, 0, 0, msg, actual_x(msg, COLS - 1)); ~~~~~~~~ ~~~~~^~~ /usr/local/opt/ncurses/include/ncursesw/curses.h:1296:94: note: expanded from macro 'mvwaddnstr' #define mvwaddnstr(win,y,x,str,n) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),(n))) ^ prompt.c:709:36: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] mvwaddnstr(bottomwin, 0, 0, msg, actual_x(msg, COLS - 1)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/opt/ncurses/include/ncursesw/curses.h:1296:94: note: expanded from macro 'mvwaddnstr' #define mvwaddnstr(win,y,x,str,n) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),(n))) ~~~~~~~~ ^ 14 warnings generated. rcfile.c:154:19: warning: format string is not a string literal [-Wformat-nonliteral] vfprintf(stderr, _(msg), ap); ^ ~~~ ./nano.h:109:19: note: expanded from macro '_' #define _(string) (string) ^~~~~~~ rcfile.c:372:15: warning: implicit conversion loses integer precision: 'int' to 'char' [-Wconversion] keycopy[0] = toupper((unsigned char)keycopy[0]); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rcfile.c:373:15: warning: implicit conversion loses integer precision: 'int' to 'char' [-Wconversion] keycopy[1] = toupper((unsigned char)keycopy[1]); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rcfile.c:376:17: warning: implicit conversion loses integer precision: 'int' to 'char' [-Wconversion] keycopy[2] = toupper((unsigned char)keycopy[2]); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rcfile.c:386:16: warning: implicit conversion loses integer precision: 'int' to 'char' [-Wconversion] keycopy[1] = tolower((unsigned char)keycopy[1]); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rcfile.c:1058:21: warning: implicit conversion changes signedness: 'const long' to 'unsigned long' [-Wsign-conversion] UNSET(rcopts[i].flag); ~~~~~~~~~~~~~~~~^~~~~ ./nano.h:58:27: note: expanded from macro 'UNSET' #define UNSET(flag) FLAGS(flag) &= ~FLAGMASK(flag) ~~~~~~^~~~~ ./nano.h:55:29: note: expanded from macro 'FLAGS' #define FLAGS(flag) flags[((flag) / (sizeof(unsigned) * 8))] ^~~~ ~ rcfile.c:1058:21: warning: implicit conversion changes signedness: 'const long' to 'unsigned long' [-Wsign-conversion] UNSET(rcopts[i].flag); ~~~~~~~~~~~~~~~~^~~~~ ./nano.h:58:46: note: expanded from macro 'UNSET' #define UNSET(flag) FLAGS(flag) &= ~FLAGMASK(flag) ~~~~~~~~~^~~~~ ./nano.h:56:42: note: expanded from macro 'FLAGMASK' #define FLAGMASK(flag) ((unsigned)1 << ((flag) % (sizeof(unsigned) * 8))) ^~~~ ~ rcfile.c:1066:18: warning: implicit conversion changes signedness: 'const long' to 'unsigned long' [-Wsign-conversion] SET(rcopts[i].flag); ~~~~~~~~~~~~~~^~~~~ ./nano.h:57:25: note: expanded from macro 'SET' #define SET(flag) FLAGS(flag) |= FLAGMASK(flag) ~~~~~~^~~~~ ./nano.h:55:29: note: expanded from macro 'FLAGS' #define FLAGS(flag) flags[((flag) / (sizeof(unsigned) * 8))] ^~~~ ~ rcfile.c:1066:18: warning: implicit conversion changes signedness: 'const long' to 'unsigned long' [-Wsign-conversion] SET(rcopts[i].flag); ~~~~~~~~~~~~~~^~~~~ ./nano.h:57:43: note: expanded from macro 'SET' #define SET(flag) FLAGS(flag) |= FLAGMASK(flag) ~~~~~~~~~^~~~~ ./nano.h:56:42: note: expanded from macro 'FLAGMASK' #define FLAGMASK(flag) ((unsigned)1 << ((flag) % (sizeof(unsigned) * 8))) ^~~~ ~ 9 warnings generated. search.c:86:52: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] char *disp = display_string(last_search, 0, COLS / 3, FALSE); ~~~~~~~~~~~~~~ ~~~~~^~~ search.c:166:30: warning: implicit conversion changes signedness: 'unsigned long' to 'ssize_t' (aka 'long') [-Wsign-conversion] openfile->placewewant + 1, TRUE, TRUE); ~~~~~~~~~~~~~~~~~~~~~~^~~ search.c:91:28: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare] (strlenpt(last_search) > COLS / 3) ? "..." : ""); ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~ /usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^~~~~~~~~~~ search.c:231:54: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] from = line->data + move_mbleft(line->data, from - line->data); ~~~~~~~~~~~ ~~~~~^~~~~~~~~~~~ search.c:243:37: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] found_len = regmatches[0].rm_eo - regmatches[0].rm_so; ~ ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ search.c:247:51: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] if (whole_word_only && !is_separate_word(found - line->data, ~~~~~~~~~~~~~~~~ ~~~~~~^~~~~~~~~~~~ search.c:299:18: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] found_x = found - line->data; ~ ~~~~~~^~~~~~~~~~~~ search.c:391:49: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] char *disp = display_string(str, 0, (COLS / 2) + 1, FALSE); ~~~~~~~~~~~~~~ ~~~~~~~~~~~^~~ search.c:392:56: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] size_t numchars = actual_x(disp, strnlenpt(disp, COLS / 2)); ~~~~~~~~~ ~~~~~^~~ search.c:448:37: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] size_t i = regmatches[num].rm_eo - regmatches[num].rm_so; ~ ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ search.c:442:47: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare] if (*c != '\\' || num < 1 || num > 9 || num > search_regexp.re_nsub) { ~~~ ^ ~~~~~~~~~~~~~~~~~~~~~ search.c:469:9: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] return replacement_size; ~~~~~~ ^~~~~~~~~~~~~~~~ search.c:481:35: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] match_len = regmatches[0].rm_eo - regmatches[0].rm_so; ~ ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ search.c:482:20: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] new_line_size += replace_regexp(NULL, FALSE) - match_len; ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ search.c:569:31: warning: variable 'top_x' may be uninitialized when used here [-Wconditional-uninitialized] openfile->current_x < top_x))) ^~~~~ search.c:525:14: note: initialize the variable 'top_x' to silence this warning size_t top_x, bot_x; ^ = 0 search.c:565:37: warning: variable 'top' may be uninitialized when used here [-Wconditional-uninitialized] openfile->current->lineno < top->lineno || ^~~ search.c:524:17: note: initialize the variable 'top' to silence this warning filestruct *top, *bot; ^ = NULL search.c:567:43: warning: variable 'bot_x' may be uninitialized when used here [-Wconditional-uninitialized] openfile->current_x + match_len > bot_x) || ^~~~~ search.c:525:21: note: initialize the variable 'bot_x' to silence this warning size_t top_x, bot_x; ^ = 0 search.c:564:48: warning: variable 'bot' may be uninitialized when used here [-Wconditional-uninitialized] if (was_mark && (openfile->current->lineno > bot->lineno || ^~~ search.c:524:23: note: initialize the variable 'bot' to silence this warning filestruct *top, *bot; ^ = NULL search.c:797:35: warning: implicit conversion changes signedness: 'unsigned long' to 'ssize_t' (aka 'long') [-Wsign-conversion] column = openfile->placewewant + 1; ~ ~~~~~~~~~~~~~~~~~~~~~~^~~ search.c:813:55: warning: implicit conversion changes signedness: 'unsigned long' to 'ssize_t' (aka 'long') [-Wsign-conversion] column = strlenpt(openfile->current->data) + column + 2; ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ search.c:813:48: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] column = strlenpt(openfile->current->data) + column + 2; ~ ^~~~~~ search.c:818:65: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] openfile->current_x = actual_x(openfile->current->data, column - 1); ~~~~~~~~ ~~~~~~~^~~ search.c:819:33: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] openfile->placewewant = column - 1; ~ ~~~~~~~^~~ search.c:822:49: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] if (ISSET(SOFTWRAP) && openfile->placewewant / editwincols > ~ ^~~~~~~~~~~ search.c:823:43: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] strlenpt(openfile->current->data) / editwincols) ~ ^~~~~~~~~~~ search.c:843:47: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] rows_from_tail = openfile->filebot->lineno - ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~^ search.c:861:25: warning: implicit conversion changes signedness: 'unsigned long' to 'ssize_t' (aka 'long') [-Wsign-conversion] openfile->placewewant + 1, FALSE, TRUE); ~~~~~~~~~~~~~~~~~~~~~~^~~ search.c:916:30: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] openfile->current_x = found - fileptr->data; ~ ~~~~~~^~~~~~~~~~~~~~~ search.c:974:16: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] matchhalf += parse_mbchar(matchbrackets + matchhalf, NULL, NULL); ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ search.c:987:19: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] wanted_ch - matchbrackets); ~~~~~~~~~~^~~~~~~~~~~~~~~ search.c:1007:13: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] ch, ch_len) == 0) ? 1 : -1; ^~~~~~ search.c:1007:33: warning: operand of ? changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] ch, ch_len) == 0) ? 1 : -1; ^~ search.c:976:34: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare] reverse = ((ch - matchbrackets) >= matchhalf); ~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~ 33 warnings generated. text.c:80:19: warning: format string is not a string literal [-Wformat-nonliteral] sprintf(message, invoke_error, name); ^~~~~~~~~~~~ /usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^~~~~~~~~~~ text.c:110:52: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] &openfile->current->data[openfile->current_x + char_len], ~ ^~~~~~~~ ./nano.h:65:46: note: expanded from macro 'charmove' #define charmove(dest, src, n) memmove(dest, src, (n) * sizeof(char)) ^~~ /usr/include/secure/_string.h:71:34: note: expanded from macro 'memmove' __builtin___memmove_chk (dest, src, len, __darwin_obsz0 (dest)) ^~~ text.c:111:16: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] line_len - char_len + 1); ~ ^~~~~~~~ ./nano.h:65:52: note: expanded from macro 'charmove' #define charmove(dest, src, n) memmove(dest, src, (n) * sizeof(char)) ^ /usr/include/secure/_string.h:71:39: note: expanded from macro 'memmove' __builtin___memmove_chk (dest, src, len, __darwin_obsz0 (dest)) ^~~ text.c:117:24: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] openfile->mark_x -= char_len; ~~ ^~~~~~~~ text.c:250:36: warning: implicit conversion changes signedness: 'long' to 'unsigned long' [-Wsign-conversion] char *spaces = charalloc(tabsize + 1); ~~~~~~~~~~~~~~~~~~^~~~ ./nano.h:63:45: note: expanded from macro 'charalloc' #define charalloc(howmuch) (char *)nmalloc((howmuch) * sizeof(char)) ^~~~~~~ ~ text.c:251:19: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] size_t length = tabsize - (xplustabs() % tabsize); ^~~~~~~ ~ text.c:251:44: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] size_t length = tabsize - (xplustabs() % tabsize); ~ ^~~~~~~ text.c:310:34: warning: implicit conversion changes signedness: 'long' to 'unsigned long' [-Wsign-conversion] indentation = charalloc(tabsize + 1); ~~~~~~~~~~~~~~~~~~^~~~ ./nano.h:63:45: note: expanded from macro 'charalloc' #define charalloc(howmuch) (char *)nmalloc((howmuch) * sizeof(char)) ^~~~~~~ ~ text.c:314:29: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] charset(indentation, ' ', tabsize); ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ ./nano.h:66:50: note: expanded from macro 'charset' #define charset(dest, src, n) memset(dest, src, (n) * sizeof(char)) ^ ~ /usr/include/secure/_string.h:77:38: note: expanded from macro 'memset' __builtin___memset_chk (dest, val, len, __darwin_obsz0 (dest)) ^~~ text.c:353:11: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] return tabsize; ~~~~~~ ^~~~~~~ text.c:352:24: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'ssize_t' (aka 'long') [-Wsign-compare] if (++bytes_of_white == tabsize) ~~~~~~~~~~~~~~~~ ^ ~~~~~~~ text.c:485:41: warning: operand of ? changes signedness: 'long' to 'unsigned long' [-Wsign-conversion] size_t pre_len = post_seq ? post_seq++ - comment_seq : comment_seq_len; ~~~~~~~ ~~~~~~~~~~~^~~~~~~~~~~~~ text.c:700:10: warning: enumeration values 'PREFLIGHT' and 'OTHER' not explicitly handled in switch [-Wswitch-enum] switch (u->type) { ^ text.c:875:10: warning: enumeration values 'PREFLIGHT' and 'OTHER' not explicitly handled in switch [-Wswitch-enum] switch (u->type) { ^ text.c:1076:31: warning: unused parameter 'signal' [-Wunused-parameter] RETSIGTYPE cancel_command(int signal) ^ text.c:1181:28: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] group->bottom_line - group->top_line); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ text.c:1274:24: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] u->mark_begin_x += char_len; ~~ ^~~~~~~~ text.c:1249:10: warning: enumeration values 'PREFLIGHT' and 'OTHER' not explicitly handled in switch [-Wswitch-enum] switch (u->type) { ^ text.c:1349:70: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] number_of_lines = u->grouping->bottom_line - u->grouping->top_line + 1; ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ text.c:1398:19: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] char_buf, char_len); ^~~~~~~~ text.c:1413:70: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] u->strdata = addstrings(u->strdata, strlen(u->strdata), char_buf, char_len); ~~~~~~~~~~ ^~~~~~~~ text.c:1415:48: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] } else if (openfile->current_x == u->begin - char_len) { ~ ^~~~~~~~ text.c:1417:38: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] u->strdata = addstrings(char_buf, char_len, u->strdata, strlen(u->strdata)); ~~~~~~~~~~ ^~~~~~~~ text.c:1392:10: warning: 6 enumeration values not explicitly handled in switch: 'INDENT', 'UNINDENT', 'COMMENT'... [-Wswitch-enum] switch (u->type) { ^ text.c:1557:27: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] rest_length = line_len - wrap_loc; ~ ^~~~~~~~ text.c:1595:24: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] openfile->current_x = wrap_loc; ~ ^~~~~~~~ text.c:1599:43: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] size_t tail_x = move_mbleft(line->data, wrap_loc); ~~~~~~~~~~~ ^~~~~~~~ text.c:1617:35: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] openfile->current_x += (old_x - wrap_loc); ~ ^~~~~~~~ text.c:1541:36: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare] if (ISSET(AUTOINDENT) && wrap_loc == indent_length(line->data)) ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ text.c:1585:46: warning: comparison of integers of different signs: 'unsigned long' and 'ssize_t' (aka 'long') [-Wsign-compare] if (rest_length + strlen(line->next->data) <= fill) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~ text.c:1612:12: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'ssize_t' (aka 'long') [-Wsign-compare] if (old_x < wrap_loc) { ~~~~~ ^ ~~~~~~~~ text.c:1649:33: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'ssize_t' (aka 'long') [-Wsign-compare] while (*line != '\0' && column <= goal) { ~~~~~~ ^ ~~~~ text.c:1663:13: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'ssize_t' (aka 'long') [-Wsign-compare] if (column <= goal) ~~~~~~ ^ ~~~~ text.c:1721:10: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] len += charlen; ~~ ^~~~~~~ text.c:1768:14: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] shift += end_len; ~~ ^~~~~~~ text.c:1774:20: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] mark_shift += end_len; ~~ ^~~~~~~ text.c:1822:14: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] shift += end_len; ~~ ^~~~~~~ text.c:1828:20: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] mark_shift += end_len; ~~ ^~~~~~~ text.c:1855:40: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] null_at(&new_paragraph_data, new_end - new_paragraph_data); ~~~~~~~ ~~~~~~~~^~~~~~~~~~~~~~~~~~~~ text.c:1865:32: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] openfile->mark_x = new_end - new_paragraph_data; ~ ~~~~~~~~^~~~~~~~~~~~~~~~~~~~ text.c:1773:24: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'long' [-Wsign-compare] openfile->mark_x >= end - paragraph->data) ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~ text.c:1827:24: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'long' [-Wsign-compare] openfile->mark_x >= end - paragraph->data) ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~ text.c:1864:25: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'long' [-Wsign-compare] if (openfile->mark_x > new_end - new_paragraph_data) ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ text.c:1884:17: warning: implicit conversion changes signedness: 'regoff_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] return matches.rm_eo; ~~~~~~ ~~~~~~~~^~~~~ text.c:2107:38: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] par_len = openfile->current->lineno - current_save->lineno; ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ text.c:2209:39: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] filebot_inpar = (openfile->current->lineno + par_len == ~~~~~~~~~~~~~~~~~~~^~~~~~ ~ text.c:2218:59: warning: operand of ? changes signedness: 'long' to 'unsigned long' [-Wsign-conversion] openfile->filebot->lineno - openfile->current->lineno + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ text.c:2320:10: warning: implicit conversion changes signedness: 'unsigned long' to 'ssize_t' (aka 'long') [-Wsign-conversion] fill - strnlenpt(openfile->current->data, indent_len), FALSE); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ text.c:2320:5: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] fill - strnlenpt(openfile->current->data, indent_len), FALSE); ^~~~ ~ text.c:2323:27: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] if (break_pos == -1 || break_pos + indent_len == line_len) ^~~~~~~~~ ~ text.c:2342:16: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] line_len - break_pos); ~ ^~~~~~~~~ ./nano.h:63:45: note: expanded from macro 'charalloc' #define charalloc(howmuch) (char *)nmalloc((howmuch) * sizeof(char)) ^~~~~~~ text.c:2357:25: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] openfile->mark_x -= break_pos - indent_len; ^~~~~~~~~ ~ text.c:2370:38: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] null_at(&openfile->current->data, break_pos); ~~~~~~~ ^~~~~~~~~ text.c:2209:56: warning: comparison of integers of different signs: 'unsigned long' and 'long' [-Wsign-compare] filebot_inpar = (openfile->current->lineno + par_len == ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ text.c:2312:59: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'ssize_t' (aka 'long') [-Wsign-compare] while (par_len > 0 && strlenpt(openfile->current->data) > fill) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~ text.c:2355:24: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'ssize_t' (aka 'long') [-Wsign-compare] openfile->mark_x > break_pos) { ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~ text.c:2516:46: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] *arguments = (char **)nrealloc(*arguments, ++count * sizeof(char *)); ^~~~~~~ ~ text.c:2628:21: warning: variable 'top' may be uninitialized when used here [-Wconditional-uninitialized] openfile->mark = top; ^~~ text.c:2547:17: note: initialize the variable 'top' to silence this warning filestruct *top, *bot; ^ = NULL text.c:2629:23: warning: variable 'top_x' may be uninitialized when used here [-Wconditional-uninitialized] openfile->mark_x = top_x; ^~~~~ text.c:2548:14: note: initialize the variable 'top_x' to silence this warning size_t top_x, bot_x; ^ = 0 text.c:2760:24: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] if ((pipe_buff_size = fpathconf(uniq_fd[0], _PC_PIPE_BUF)) < 1) { ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ text.c:2770:22: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] while ((bytesread = read(uniq_fd[0], read_buff_ptr, pipe_buff_size)) > 0) { ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ text.c:3081:24: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] if ((pipe_buff_size = fpathconf(lint_fd[0], _PC_PIPE_BUF)) < 1) { ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ text.c:3092:22: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] while ((bytesread = read(lint_fd[0], read_buff_ptr, pipe_buff_size)) > 0) { ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ text.c:3260:51: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] goto_line_posx(curlint->lineno, curlint->colno - 1); ~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~^~~ text.c:3251:6: warning: code will never be executed [-Wunreachable-code] free(dontwantfile); ^~~~ text.c:3536:39: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] int next = move_mbright(check_line, position); ~~~~~~~~~~~~ ^~~~~~~~ text.c:3541:31: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] word = charalloc(len_of_word + 1); ~~~~~~~~~~~~~~~~~~~~~~^~~~ ./nano.h:63:45: note: expanded from macro 'charalloc' #define charalloc(howmuch) (char *)nmalloc((howmuch) * sizeof(char)) ^~~~~~~ ~ text.c:3536:14: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] int next = move_mbright(check_line, position); ~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ text.c:3596:20: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] start_of_shard = step_left; ~ ^~~~~~~~~ text.c:3642:41: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] move_mbleft(pletion_line->data, i)], FALSE)) ~~~~~~~~~~~ ^ text.c:3592:19: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] int step_left = move_mbleft(openfile->current->data, start_of_shard); ~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ text.c:3614:61: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] int threshold = strlen(pletion_line->data) - shard_length - 1; ~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ text.c:3628:18: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare] for (j = 1; j < shard_length; j++) ~ ^ ~~~~~~~~~~~~ text.c:3633:10: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare] if (j < shard_length) ~ ^ ~~~~~~~~~~~~ text.c:3647:9: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] i == openfile->current_x - shard_length) ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 75 warnings generated. utils.c:286:20: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] ceiling = start - haystack; ~ ~~~~~~^~~~~~~~~~ utils.c:287:30: warning: implicit conversion changes signedness: 'regoff_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] last_find = regmatches[0].rm_so; ~ ~~~~~~~~~~~~~~^~~~~ utils.c:297:31: warning: implicit conversion changes signedness: 'regoff_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] last_find = regmatches[0].rm_so; ~ ~~~~~~~~~~~~~~^~~~~ utils.c:302:27: warning: implicit conversion changes signedness: 'size_t' (aka 'unsigned long') to 'regoff_t' (aka 'long') [-Wsign-conversion] regmatches[0].rm_so = next_rung; ~ ^~~~~~~~~ utils.c:303:27: warning: implicit conversion changes signedness: 'size_t' (aka 'unsigned long') to 'regoff_t' (aka 'long') [-Wsign-conversion] regmatches[0].rm_eo = far_end; ~ ^~~~~~~ utils.c:310:26: warning: implicit conversion changes signedness: 'size_t' (aka 'unsigned long') to 'regoff_t' (aka 'long') [-Wsign-conversion] regmatches[0].rm_so = floor; ~ ^~~~~ utils.c:311:26: warning: implicit conversion changes signedness: 'size_t' (aka 'unsigned long') to 'regoff_t' (aka 'long') [-Wsign-conversion] regmatches[0].rm_eo = far_end; ~ ^~~~~~~ utils.c:321:25: warning: implicit conversion changes signedness: 'unsigned long' to 'regoff_t' (aka 'long') [-Wsign-conversion] regmatches[0].rm_eo = strlen(haystack); ~ ^~~~~~~~~~~~~~~~ utils.c:295:31: warning: comparison of integers of different signs: 'regoff_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare] while (regmatches[0].rm_so <= ceiling) { ~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~ utils.c:418:51: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] return column - 7 - (column - 7) % (editwincols - 8); ~ ~~~~~~~~~~~~^~~ utils.c:420:32: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] return column - (editwincols - 2); ~ ~~~~~~~~~~~~^~~ utils.c:415:13: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare] if (column < editwincols - 1 || ISSET(SOFTWRAP) || column == 0) ~~~~~~ ^ ~~~~~~~~~~~~~~~ utils.c:448:15: warning: implicit conversion changes signedness: 'long' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] return (text - start); ~~~~~~ ~~~~~^~~~~~~ utils.c:462:20: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] size_t charlen = parse_mbchar(text, NULL, &width); ~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 14 warnings generated. winio.c:293:15: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] for (int i = strlen(string); i > 0; i--) ~ ^~~~~~~~~~~~~~ winio.c:1276:29: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] sequence = get_input(NULL, length); ~~~~~~~~~ ^~~~~~ winio.c:1277:38: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] retval = convert_sequence(sequence, length, &consumed); ~~~~~~~~~~~~~~~~ ^~~~~~ winio.c:1275:33: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] length = (key_buffer_len < 5 ? key_buffer_len : 5); ~ ^~~~~~~~~~~~~~ winio.c:1560:13: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] for (i = *count; i > 0 ; i--) { ~ ^~~~~~ winio.c:1645:14: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] number = MAIN_VISIBLE; ~ ^~~~~~~~~~~~ ./nano.h:630:42: note: expanded from macro 'MAIN_VISIBLE' #define MAIN_VISIBLE (((COLS + 40) / 20) * 2) ~~~~~~~~~~~~~~~~~~~^~~ winio.c:1653:14: warning: implicit conversion changes signedness: 'unsigned long' to 'int' [-Wsign-conversion] i = COLS / ((number / 2) + (number % 2)); ~ ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ winio.c:1653:9: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] i = COLS / ((number / 2) + (number % 2)); ^~~~ ~ winio.c:1644:15: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare] if (number > MAIN_VISIBLE) ~~~~~~ ^ ~~~~~~~~~~~~ winio.c:1659:11: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare] if ((j > number) && (*mouse_x % i < COLS % i)) ~ ^ ~~~~~~ winio.c:1664:10: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare] if (j > number) ~ ^ ~~~~~~ winio.c:1855:50: warning: implicit conversion changes signedness: 'long' to 'unsigned long' [-Wsign-conversion] converted = charalloc(strlen(buf) * (MAXCHARLEN + tabsize) + 1); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ ./nano.h:63:45: note: expanded from macro 'charalloc' #define charalloc(howmuch) (char *)nmalloc((howmuch) * sizeof(char)) ^~~~~~~ winio.c:1904:36: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] !ISSET(SOFTWRAP) || column % tabsize == 0 || ~ ^~~~~~~ winio.c:1915:20: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] while (column % tabsize != 0 && column < beyond) { ~ ^~~~~~~ winio.c:1939:14: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] column += charwidth; ~~ ^~~~~~~~~ winio.c:2090:22: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] offset = verlen + (COLS - (verlen + pluglen + statelen) - ^~~~ ~ winio.c:2108:48: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] caption = display_string(path, 3 + pathlen - COLS + statelen, ~ ^~~~ winio.c:2109:11: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] COLS - statelen, FALSE); ^~~~ ~ winio.c:2116:24: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] mvwaddstr(topwin, 0, COLS - statelen, state); ^~~~ ~ /usr/local/opt/ncurses/include/ncursesw/curses.h:1297:51: note: expanded from macro 'mvwaddstr' #define mvwaddstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),-1)) ^ winio.c:2118:51: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] mvwaddnstr(topwin, 0, 0, state, actual_x(state, COLS)); ~~~~~~~~ ^~~~ /usr/local/opt/ncurses/include/ncursesw/curses.h:1296:94: note: expanded from macro 'mvwaddnstr' #define mvwaddnstr(win,y,x,str,n) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),(n))) ^ winio.c:2072:56: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare] if (verlen + prefixlen + pathlen + pluglen + statelen <= COLS) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~ winio.c:2077:57: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare] if (verlen + prefixlen + pathlen + pluglen + statelen > COLS) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~ winio.c:2080:57: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare] if (verlen + prefixlen + pathlen + pluglen + statelen > COLS) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~ winio.c:2094:56: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare] if (verlen + prefixlen + pathlen + pluglen + statelen <= COLS) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~ winio.c:2095:24: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] mvwaddstr(topwin, 0, offset, prefix); ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ /usr/local/opt/ncurses/include/ncursesw/curses.h:1297:51: note: expanded from macro 'mvwaddstr' #define mvwaddstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),-1)) ~~~~~ ^ winio.c:2099:20: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] wmove(topwin, 0, offset); ~~~~~ ^~~~~~ winio.c:2102:35: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare] if (pathlen + pluglen + statelen <= COLS) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~ winio.c:2106:26: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare] } else if (5 + statelen <= COLS) { ~~~~~~~~~~~~ ^ ~~~~ winio.c:2115:31: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare] if (statelen > 0 && statelen <= COLS) ~~~~~~~~ ^ ~~~~ winio.c:2116:29: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] mvwaddstr(topwin, 0, COLS - statelen, state); ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/local/opt/ncurses/include/ncursesw/curses.h:1297:51: note: expanded from macro 'mvwaddstr' #define mvwaddstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),-1)) ~~~~~ ^ winio.c:2118:35: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] mvwaddnstr(topwin, 0, 0, state, actual_x(state, COLS)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/local/opt/ncurses/include/ncursesw/curses.h:1296:94: note: expanded from macro 'mvwaddnstr' #define mvwaddnstr(win,y,x,str,n) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),(n))) ~~~~~~~~ ^ winio.c:2162:20: warning: format string is not a string literal [-Wformat-nonliteral] vfprintf(stderr, msg, ap); ^~~ winio.c:2195:34: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] compound = charalloc(MAXCHARLEN * (COLS + 1)); ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ ./nano.h:63:45: note: expanded from macro 'charalloc' #define charalloc(howmuch) (char *)nmalloc((howmuch) * sizeof(char)) ^~~~~~~ ~ winio.c:2196:47: warning: format string is not a string literal [-Wformat-nonliteral] vsnprintf(compound, MAXCHARLEN * (COLS + 1), msg, ap); ^~~ winio.c:2198:40: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] message = display_string(compound, 0, COLS, FALSE); ~~~~~~~~~~~~~~ ^~~~ winio.c:2201:15: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] start_col = (COLS - strlenpt(message)) / 2; ^~~~ ~ winio.c:2204:45: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] wmove(bottomwin, 0, (bracketed ? start_col - 2 : start_col)); ~~~~~ ~~~~~~~~~~^~~ winio.c:2204:51: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] wmove(bottomwin, 0, (bracketed ? start_col - 2 : start_col)); ~~~~~ ^~~~~~~~~ winio.c:2254:12: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] number = MAIN_VISIBLE; ~ ^~~~~~~~~~~~ ./nano.h:630:42: note: expanded from macro 'MAIN_VISIBLE' #define MAIN_VISIBLE (((COLS + 40) / 20) * 2) ~~~~~~~~~~~~~~~~~~~^~~ winio.c:2257:14: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] itemwidth = COLS / ((number / 2) + (number % 2)); ^~~~ ~ winio.c:2277:52: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] post_one_key(s->keystr, _(f->desc), itemwidth + (COLS % itemwidth)); ^~~~ ~ winio.c:2253:13: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare] if (number > MAIN_VISIBLE) ~~~~~~ ^ ~~~~~~~~~~~~ winio.c:2275:39: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] wmove(bottomwin, 1 + i % 2, (i / 2) * itemwidth); ~~~~~ ~~~~~~~~^~~~~~~~~~~ winio.c:2277:49: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] post_one_key(s->keystr, _(f->desc), itemwidth + (COLS % itemwidth)); ~~~~~~~~~~~~ ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ winio.c:2292:53: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] waddnstr(bottomwin, keystroke, actual_x(keystroke, width)); ~~~~~~~~ ^~~~~ winio.c:2302:47: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] waddnstr(bottomwin, tag, actual_x(tag, width - 1)); ~~~~~~~~ ~~~~~~^~~ winio.c:2292:33: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] waddnstr(bottomwin, keystroke, actual_x(keystroke, width)); ~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~ winio.c:2302:27: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] waddnstr(bottomwin, tag, actual_x(tag, width - 1)); ~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~ winio.c:2337:20: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] wmove(edit, row, margin + col); ^~~~~~ ~ winio.c:2337:15: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32] wmove(edit, row, margin + col); ~~~~~ ^~~ winio.c:2337:27: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] wmove(edit, row, margin + col); ~~~~~ ~~~~~~~^~~~~ winio.c:2357:53: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] size_t till_x = actual_x(fileptr->data, from_col + editwincols - 1) + 1; ~ ^~~~~~~~~~~ winio.c:2443:27: warning: implicit conversion changes signedness: 'regoff_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] index + match.rm_eo); ~ ~~~~~~^~~~~ winio.c:2450:20: warning: implicit conversion changes signedness: 'regoff_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] index = match.rm_eo; ~ ~~~~~~^~~~~ winio.c:2458:17: warning: implicit conversion changes signedness: 'regoff_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] match.rm_so) - from_col; ~~~~~~^~~~~ winio.c:2460:48: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] thetext = converted + actual_x(converted, start_col); ~~~~~~~~ ^~~~~~~~~ winio.c:2463:17: warning: implicit conversion changes signedness: 'regoff_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] match.rm_eo) - from_col - start_col); ~~~~~~^~~~~ winio.c:2463:37: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] match.rm_eo) - from_col - start_col); ~ ^~~~~~~~~ winio.c:2517:25: warning: implicit conversion changes signedness: 'regoff_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] index += startmatch.rm_eo; ~~ ~~~~~~~~~~~^~~~~ winio.c:2523:23: warning: implicit conversion changes signedness: 'regoff_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] index += endmatch.rm_eo; ~~ ~~~~~~~~~^~~~~ winio.c:2562:22: warning: implicit conversion changes signedness: 'regoff_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] endmatch.rm_eo) - from_col); ~~~~~~~~~^~~~~ winio.c:2570:43: warning: operand of ? changes signedness: 'regoff_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] index = (paintlen == 0) ? 0 : endmatch.rm_eo; ~ ~~~~~~~~~^~~~~ winio.c:2582:20: warning: implicit conversion changes signedness: 'regoff_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] startmatch.rm_so) - from_col; ~~~~~~~~~~~^~~~~ winio.c:2584:47: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] thetext = converted + actual_x(converted, start_col); ~~~~~~~~ ^~~~~~~~~ winio.c:2598:20: warning: implicit conversion changes signedness: 'regoff_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] endmatch.rm_eo) - from_col - start_col); ~~~~~~~~~^~~~~ winio.c:2598:40: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] endmatch.rm_eo) - from_col - start_col); ~ ^~~~~~~~~ winio.c:2605:23: warning: implicit conversion changes signedness: 'regoff_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion] index = endmatch.rm_eo; ~ ~~~~~~~~~^~~~~ winio.c:2674:46: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] thetext = converted + actual_x(converted, start_col); ~~~~~~~~ ^~~~~~~~~ winio.c:2680:44: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] paintlen = actual_x(thetext, end_col - start_col); ~ ^~~~~~~~~ winio.c:2453:22: warning: comparison of integers of different signs: 'regoff_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare] if (match.rm_eo <= from_x || match.rm_so >= till_x) ~~~~~~~~~~~ ^ ~~~~~~ winio.c:2453:47: warning: comparison of integers of different signs: 'regoff_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare] if (match.rm_eo <= from_x || match.rm_so >= till_x) ~~~~~~~~~~~ ^ ~~~~~~ winio.c:2456:31: warning: comparison of integers of different signs: 'regoff_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare] start_col = (match.rm_so <= from_x) ? ~~~~~~~~~~~ ^ ~~~~~~ winio.c:2458:24: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] match.rm_so) - from_col; ~~~~~~~~~~~~~^~~~~~~~~~ winio.c:2462:17: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] paintlen = actual_x(thetext, strnlenpt(fileptr->data, ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ winio.c:2560:23: warning: comparison of integers of different signs: 'regoff_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare] if (endmatch.rm_eo > from_x) { ~~~~~~~~~~~~~~ ^ ~~~~~~ winio.c:2561:16: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] paintlen = actual_x(converted, strnlenpt(fileptr->data, ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ winio.c:2580:35: warning: comparison of integers of different signs: 'regoff_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare] start_col = (startmatch.rm_so <= from_x) ? ~~~~~~~~~~~~~~~~ ^ ~~~~~~ winio.c:2582:27: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] startmatch.rm_so) - from_col; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~ winio.c:2595:25: warning: comparison of integers of different signs: 'regoff_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare] if (endmatch.rm_eo > from_x && ~~~~~~~~~~~~~~ ^ ~~~~~~ winio.c:2597:18: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] paintlen = actual_x(thetext, strnlenpt(fileptr->data, ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ winio.c:2669:48: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] start_col = strnlenpt(fileptr->data, top_x) - from_col; ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ winio.c:2680:16: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] paintlen = actual_x(thetext, end_col - start_col); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ winio.c:2730:54: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] converted = display_string(fileptr->data, from_col, editwincols, TRUE); ~~~~~~~~~~~~~~ ^~~~~~~~~~~ winio.c:2738:43: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] if (strlenpt(fileptr->data) > from_col + editwincols) ~ ^~~~~~~~~~~ winio.c:2711:24: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] row = fileptr->lineno - openfile->edittop->lineno; ~ ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ winio.c:2801:46: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare] if (!ISSET(AT_BLANKS) && to_col - from_col < editwincols) ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~ winio.c:2802:35: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] mvwaddch(edit, row - 1, to_col - from_col, '>'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/local/opt/ncurses/include/ncursesw/curses.h:1293:49: note: expanded from macro 'mvwaddch' #define mvwaddch(win,y,x,ch) (wmove((win),(y),(x)) == ERR ? ERR : waddch((win),(ch))) ~~~~~ ^ winio.c:2841:38: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] return go_forward_chunks(chunk - i, line, leftedge); ~ ^ winio.c:2840:14: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare] if (chunk >= i) ~~~~~ ^ ~ winio.c:2841:36: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] return go_forward_chunks(chunk - i, line, leftedge); ~~~~~~~~~~~~~~~~~ ~~~~~~^~~ winio.c:2916:30: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion] return (openfile->current->lineno - was_lineno < editwinrows); ~~~~~~~~~~~~~~~~~~~^~~~~~ ~ winio.c:2912:41: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare] return (rows_left > 0 || line->lineno < was_lineno || ~~~~~~~~~~~~ ^ ~~~~~~~~~~ winio.c:2913:19: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare] (line->lineno == was_lineno && leftedge <= was_leftedge)); ~~~~~~~~~~~~ ^ ~~~~~~~~~~ winio.c:2916:50: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare] return (openfile->current->lineno - was_lineno < editwinrows); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~ winio.c:2986:34: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] size_t goal_column = leftedge + editwincols; ~ ^~~~~~~~~~~ winio.c:3262:20: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32] goal = openfile->current_y; ~ ~~~~~~~~~~^~~~~~~~~ winio.c:3353:44: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] linepct = 100 * openfile->current->lineno / openfile->filebot->lineno; ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ winio.c:3354:25: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] colpct = 100 * cur_xpt / cur_lenpt; ~ ~~~~~~~~~~~~~~^~~~~~~~~~~ winio.c:3355:53: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] charpct = (openfile->totsize == 0) ? 0 : 100 * sum / openfile->totsize; ~ ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ winio.c:3411:9: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] room = editwincols + get_page_start(from_col) - from_col; ^~~~~~~~~~~ ~ winio.c:3420:23: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] waddnstr(edit, word, actual_x(word, room)); ~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~ winio.c:3467:24: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] waddnstr(edit, word, actual_x(word, break_col)); ~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~ winio.c:3477:15: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32] wmove(edit, ++row, 0); ~~~~~ ^~~~~ winio.c:3597:21: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] start_col = COLS / 2 - strlenpt(what) / 2 - 1; ~~~~~^~~ ~ winio.c:3599:13: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] start_col, what); ^~~~~~~~~~~~~~~~ /usr/local/opt/ncurses/include/ncursesw/curses.h:1297:51: note: expanded from macro 'mvwaddstr' #define mvwaddstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),-1)) ~~~~~ ^ 105 warnings generated.