edit.c: In function 'edit_move_block_to_left':
edit.c:1652:13: warning: cannot optimize possibly infinite loops [-Wunsafe-loop-optimizations]
for (i = 1; i <= del_tab_width; i++)
^~~
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
serialize.c: In function 'mc_serialize_str':
serialize.c:116:34: error: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'size_t {aka long unsigned int}' [-Werror=format=]
return g_strdup_printf ("%c%zd" SRLZ_DELIM_S "%s", prefix, strlen (data), data);
^
serialize.c:130:19: error: format '%zd' expects argument of type 'signed size_t', but argument 5 has type 'size_t {aka long unsigned int}' [-Werror=format=]
#define FUNC_NAME "mc_serialize_str()"
^
serialize.c:175:22: note: in expansion of macro 'FUNC_NAME'
FUNC_NAME
^~~~~~~~~
serialize.c:130:19: error: format '%zd' expects argument of type 'signed size_t', but argument 6 has type 'size_t {aka long unsigned int}' [-Werror=format=]
#define FUNC_NAME "mc_serialize_str()"
^
serialize.c:175:22: note: in expansion of macro 'FUNC_NAME'
FUNC_NAME
^~~~~~~~~
serialize.c: In function 'mc_deserialize_config':
serialize.c:267:19: error: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'size_t {aka long unsigned int}' [-Werror=format=]
#define FUNC_NAME "mc_deserialize_config()"
^
serialize.c:269:35: note: in expansion of macro 'FUNC_NAME'
prepend_error_message (error, FUNC_NAME " at %zd", current_position + 1); \
^~~~~~~~~
serialize.c:301:17: note: in expansion of macro 'prepend_error_and_exit'
prepend_error_and_exit ();
^~~~~~~~~~~~~~~~~~~~~~
serialize.c:267:19: error: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'size_t {aka long unsigned int}' [-Werror=format=]
#define FUNC_NAME "mc_deserialize_config()"
^
serialize.c:269:35: note: in expansion of macro 'FUNC_NAME'
prepend_error_message (error, FUNC_NAME " at %zd", current_position + 1); \
^~~~~~~~~
serialize.c:313:17: note: in expansion of macro 'prepend_error_and_exit'
prepend_error_and_exit ();
^~~~~~~~~~~~~~~~~~~~~~
serialize.c:267:19: error: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'size_t {aka long unsigned int}' [-Werror=format=]
#define FUNC_NAME "mc_deserialize_config()"
^
serialize.c:269:35: note: in expansion of macro 'FUNC_NAME'
prepend_error_message (error, FUNC_NAME " at %zd", current_position + 1); \
^~~~~~~~~
serialize.c:325:17: note: in expansion of macro 'prepend_error_and_exit'
prepend_error_and_exit ();
^~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
midnight.c: In function 'quit_cmd_internal':
midnight.c:1027:31: error: format '%zd' expects argument of type 'signed size_t', but argument 4 has type 'size_t {aka long unsigned int}' [-Werror=format=]
"You have %zd opened screens. Quit anyway?", n), n);
^
midnight.c:1026:31: error: format '%zd' expects argument of type 'signed size_t', but argument 4 has type 'size_t {aka long unsigned int}' [-Werror=format=]
ngettext ("You have %zd opened screen. Quit anyway?",
^
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
info.c: In function 'info_show_info':
info.c:193:29: error: format '%X' expects argument of type 'unsigned int', but argument 2 has type 'int' [-Werror=format=]
tty_printf (" (%Xh)", myfs_stats.type);
^
info.c:239:51: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'long unsigned int' [-Werror=format=]
tty_printf (ngettext (" (%ld block)", " (%ld blocks)",
^
info.c:239:35: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'long unsigned int' [-Werror=format=]
tty_printf (ngettext (" (%ld block)", " (%ld blocks)",
^
info.c:259:23: error: format '%X' expects argument of type 'unsigned int', but argument 2 has type 'int' [-Werror=format=]
tty_printf (_("Location: %Xh:%Xh"), (int) st.st_dev, (int) st.st_ino);
^
info.c:259:21: note: in expansion of macro '_'
tty_printf (_("Location: %Xh:%Xh"), (int) st.st_dev, (int) st.st_ino);
^
info.c:259:23: error: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'int' [-Werror=format=]
tty_printf (_("Location: %Xh:%Xh"), (int) st.st_dev, (int) st.st_ino);
^
info.c:259:21: note: in expansion of macro '_'
tty_printf (_("Location: %Xh:%Xh"), (int) st.st_dev, (int) st.st_ino);
^
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
hex.c: In function 'mc_search__hex_translate_to_regex':
hex.c:79:39: error: format '%x' expects argument of type 'unsigned int *', but argument 3 has type 'int *' [-Wformat=]
if (sscanf (tmp_str + loop, "%x%n", &val, &ptr))
^
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
ftpfs.c: In function 'ftpfs_chmod':
ftpfs.c:2029:52: error: format '%o' expects argument of type 'unsigned int', but argument 4 has type 'int' [-Werror=format=]
g_snprintf (buf, sizeof (buf), "SITE CHMOD %4.4o /%%s", (int) (mode & 07777));
^
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
find.c: In function 'found_num_update':
find.c:373:44: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'long unsigned int' [-Werror=format=]
g_snprintf (buffer, sizeof (buffer), _("Found: %ld"), matches);
^
find.c: In function 'do_search':
find.c:1306:51: error: format '%zd' expects argument of type 'signed size_t', but argument 4 has type 'size_t {aka long unsigned int}' [-Werror=format=]
"Finished (ignored %zd directories)",
^
find.c:1305:51: error: format '%zd' expects argument of type 'signed size_t', but argument 4 has type 'size_t {aka long unsigned int}' [-Werror=format=]
ngettext ("Finished (ignored %zd directory)",
^
file.c:2526:41: error: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'size_t {aka long unsigned int}' [-Werror=format=]
label_set_textv (dsm->count_size, _("Directories: %zd, total size: %s"),
^
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
file.c:2526:41: error: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'size_t {aka long unsigned int}' [-Werror=format=]
label_set_textv (dsm->count_size, _("Directories: %zd, total size: %s"),
^
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
editdraw.c:127:62: error: format '%d' expects argument of type 'int', but argument 4 has type 'unsigned int' [-Werror=format=]
g_snprintf (byte_str, sizeof (byte_str), "%04d 0x%03X",
^
editdraw.c:326:30: error: format '%d' expects argument of type 'int', but argument 2 has type 'unsigned int' [-Werror=format=]
tty_printf ("[%05d 0x%04X]", cur_utf, cur_utf);
^
editdraw.c:334:30: error: format '%d' expects argument of type 'int', but argument 2 has type 'unsigned int' [-Werror=format=]
tty_printf ("[%05d 0x%04X]", (unsigned int) cur_byte, (unsigned int) cur_byte);
^
editdraw.c:554:20: warning: conversion to 'unsigned int' from 'long int' may alter its value [-Wconversion]
cur_line = edit->start_line + row;
^~~~
editdraw.c:557:59: error: format '%i' expects argument of type 'int', but argument 4 has type 'unsigned int' [-Werror=format=]
g_snprintf (line_stat, sizeof (line_stat), "%7i ", cur_line + 1);
^
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(init_subshell_child): cleanup -Wformat-signedness warning.
common.c:330:26: error: format '%d' expects argument of type 'int', but argument 3 has type 'unsigned int' [-Werror=format=]
fprintf (stderr, __FILE__ ": unimplemented subshell type %d\r\n", mc_global.shell->type);
^~~~~~~~
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 3145_true_color:
Update po/*.po files.
(parse_256_or_true_color_name): minor optimization.
Ticket #3145: support for True Color (16 millions colors).
Apply 0-based y coordinates to be consistent with the MSG_MOUSE_DRAG
branch.
This bug was introduced in 54456a678f.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 3666_iec_si_prefixes:
Update po/*.po files.
Update English, Russian, and Spanish man pages
(size_trunc_len): align to properly use either IEC or SI prefixes with the unit B (byte).
Ticket #3666: Improper use of IEC and SI prefixes for size in size_trunc().
Additionally always put a space between number and unit which is
required by the norms.
It is important to note that really small buffers have to be bigger than it
appears because they store bytes and non-Latin scripts need more than one byte
with UTF-8 to encode them, e.g., the string "1023 МиБ" in Russian requires
11 bytes + null terminator.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
size_trunc() has been aligned to properly use either IEC or SI prefixes with
the unit B (byte). Additionally always put a space between number and unit
which is required by the norms.
Obsolete gettext message ids have been removed and some cleaned up for
duplicate words or leading spaces.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(widget_replace): if new widget cannot take focus, move focus to other widget
before widget replacement.
In our case, the focused file panel is replaced by Info one. Info panel
a) isn't selectable (it never takes focus) and b) uses CWD of current
panel. Therefore focus must be moved to other file panel to make it
current and correctly set up it's CWD before first draw of Info panel.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>