Ticket #4572 (new task)

Opened 4 months ago

Last modified 4 days ago

Prepare for release mc-4.8.33

Reported by: zaytsev Owned by:
Priority: major Milestone: 4.8.33
Component: adm Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description


Attachments

0001-buildsys-remove-orphaned-rpc-checks-after-samba-was-.patch (1.4 KB) - added by zaytsev 3 months ago.
0001-fix-typo-in-mc.emacs.keymap.patch (662 bytes) - added by krekhov 2 months ago.
mc-4572-sparse.c-fix-Wunused-macros-warning.patch (1003 bytes) - added by and 5 weeks ago.
mc-4572-tar-internal.c-fix-Wunused-macros-warning.patch (813 bytes) - added by and 5 weeks ago.
mc-4572-usermenu.c-fix-Wunused-macros-warning.patch (828 bytes) - added by and 5 weeks ago.
mc-4572-widget-common.c-fix-Wanalyzer-deref-before-check-war.patch (2.8 KB) - added by and 5 weeks ago.
mc-4572-Cleanup-cppcheck-warnings.patch (1.7 KB) - added by and 11 days ago.
mc-4572-fix-Glib-g_string_free-assertion.patch (1.0 KB) - added by and 10 days ago.
mc-4572-ftpfs.c-fix-error-handling.patch (1.1 KB) - added by and 10 days ago.
mc-4572-fix-garbage-return-value-message.patch (1.5 KB) - added by and 8 days ago.
mc-4572-quick_c-fix-undefined-behaviour.patch (3.8 KB) - added by and 7 days ago.
mc-4572-boxes_c-fix-uninitialized-value-function-call.patch (992 bytes) - added by and 5 days ago.
mc-4572-editcmd_c-fix-uninitialized-value-function-call.patch (1.5 KB) - added by and 5 days ago.
mc-4572-editsearch_c-fix-uninitialized-value-and-null-pointer-dereference.patch (1.6 KB) - added by and 5 days ago.
mc-4572-listbox_c-fix-division-by-zero-warning.patch (1017 bytes) - added by and 5 days ago.
mc-4572-quick_c-fix-memory-leak.patch (881 bytes) - added by and 5 days ago.
mc-4572-util_c-fix-undefined-binary-operator-result.patch (1.7 KB) - added by and 5 days ago.

Change History

comment:1 Changed 4 months ago by zaytsev

comment:2 Changed 3 months ago by andrew_b

Applied.

comment:3 Changed 3 months ago by zaytsev

Clang reports:

../../../src/filemanager/mountlist.c:1218:3: warning: unused label 'free_then_fail' [-Wunused-label]
 1218 |   free_then_fail:
      |   ^~~~~~~~~~~~~~~

Do I understand correctly that it doesn't make sense to fix it, because this code is copied from elsewhere and will be overwritten upon the next sync?

comment:4 Changed 3 months ago by zaytsev

Also tar stuff produces a lot of warnings:

  CC       tar-internal.lo
../../../../src/vfs/tar/tar-internal.c:403:47: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  403 |     return tar_from_header (p, s, "off_t", 0, TYPE_MAXIMUM (off_t), FALSE);
      |                                               ^~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
1 warning generated.
  CC       tar-sparse.lo
../../../../src/vfs/tar/tar-sparse.c:703:40: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  703 |             if (!decode_num (&u, nbuf, TYPE_MAXIMUM (off_t)))
      |                                        ^~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar-sparse.c:710:66: warning: comparison of integers of different signs: 'off_t' (aka 'long long') and 'unsigned long long' [-Wsign-compare]
  710 |             if (!decode_num (&u, nbuf, TYPE_MAXIMUM (size_t)) || INT_ADD_OVERFLOW (sp.offset, u)
      |                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-sparse.c:193:35: note: expanded from macro 'INT_ADD_OVERFLOW'
  193 |     _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-sparse.c:134:3: note: expanded from macro '_GL_BINARY_OP_OVERFLOW'
  134 |   op_result_overflow (a, b,                                             \
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  135 |                       _GL_INT_MINIMUM (_GL_INT_CONVERT (a, b)),         \
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  136 |                       _GL_INT_MAXIMUM (_GL_INT_CONVERT (a, b)))
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-sparse.c:169:21: note: expanded from macro '_GL_ADD_OVERFLOW'
  169 |     : (b) < 0 ? (a) <= (a) + (b)                                        \
      |                  ~  ^  ~~~~~~~~~
2 warnings generated.
  CC       tar-xheader.lo
../../../../src/vfs/tar/tar-xheader.c:313:16: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  313 |     time_t s = TYPE_MINIMUM (time_t);
      |                ^~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar-xheader.c:330:40: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  330 |             if (TYPE_SIGNED (time_t) ? TYPE_MINIMUM (time_t) <= i : 0 <= i)
      |                                        ^~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar-xheader.c:340:22: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  340 |             if (i <= TYPE_MAXIMUM (time_t))
      |                      ^~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar-xheader.c:378:30: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  378 |                     if (s == TYPE_MINIMUM (time_t))
      |                              ^~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar-xheader.c:330:69: warning: code will never be executed [-Wunreachable-code]
  330 |             if (TYPE_SIGNED (time_t) ? TYPE_MINIMUM (time_t) <= i : 0 <= i)
      |                                                                     ^
../../../../src/vfs/tar/tar-xheader.c:604:31: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  604 |     if (!decode_num (&u, arg, TYPE_MAXIMUM (off_t), keyword))
      |                               ^~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar-xheader.c:807:31: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  807 |     if (!decode_num (&u, arg, TYPE_MAXIMUM (off_t), keyword))
      |                               ^~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar-xheader.c:846:31: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  846 |     if (!decode_num (&u, arg, TYPE_MAXIMUM (off_t), keyword))
      |                               ^~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar-xheader.c:901:13: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  901 |         if (TYPE_MAXIMUM (off_t) < u)
      |             ^~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar-xheader.c:903:17: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  903 |             u = TYPE_MAXIMUM (off_t);
      |                 ^~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
10 warnings generated.
  CC       tar.lo
../../../../src/vfs/tar/tar.c:185:46: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  185 |     return tar_from_header (p, s, "major_t", TYPE_MINIMUM (major_t), TYPE_MAXIMUM (major_t), FALSE);
      |                                              ^~~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar.c:185:70: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  185 |     return tar_from_header (p, s, "major_t", TYPE_MINIMUM (major_t), TYPE_MAXIMUM (major_t), FALSE);
      |                                                                      ^~~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar.c:193:46: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  193 |     return tar_from_header (p, s, "minor_t", TYPE_MINIMUM (minor_t), TYPE_MAXIMUM (minor_t), FALSE);
      |                                              ^~~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar.c:193:70: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  193 |     return tar_from_header (p, s, "minor_t", TYPE_MINIMUM (minor_t), TYPE_MAXIMUM (minor_t), FALSE);
      |                                                                      ^~~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar.c:238:45: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  238 |     return tar_from_header (p, s, "time_t", TYPE_MINIMUM (time_t), TYPE_MAXIMUM (time_t), FALSE);
      |                                             ^~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar.c:238:68: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  238 |     return tar_from_header (p, s, "time_t", TYPE_MINIMUM (time_t), TYPE_MAXIMUM (time_t), FALSE);
      |                                                                    ^~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
6 warnings generated.

comment:5 Changed 3 months ago by andrew_b

Code of mountlist and tar is copied from gnulib.

comment:6 Changed 3 months ago by andrew_b

  • Version set to master
  • Branch state changed from no branch to on review

Branch has been rebased to recent master.
Initial changeset:8fc494fa63d65643c57be6f75cc7d466c3418324

comment:7 Changed 3 months ago by zaytsev

  • Votes for changeset set to zaytsev
  • Branch state changed from on review to approved

I'm not sure it's worth it updating the PO-files. I would rather not do it, if we are to reformat at some point. I've looked at the changes and could not find anything suspicious. I'm not a big expert though...

comment:8 Changed 3 months ago by andrew_b

  • Votes for changeset changed from zaytsev to committed-master
  • Branch state changed from approved to merged

Merged to master: [f46406473edd12debcd6b46361d518979329d528].

git log --oneline a24d45ffa..f46406473

comment:9 Changed 3 months ago by andrew_b

  • Votes for changeset committed-master deleted
  • Branch state changed from merged to no branch

comment:10 Changed 2 months ago by krekhov

Hi, I'm from the ticket: https://midnight-commander.org/ticket/4602
I am attaching my small patch here (0001-fix-typo-in-mc.emacs.keymap.patch).
Thank you.

Changed 2 months ago by krekhov

comment:11 Changed 2 months ago by andrew_b

Last edited 11 days ago by andrew_b (previous) (diff)

comment:12 Changed 8 weeks ago by zaytsev

Rebased on master so that this branch gets CI.

comment:13 Changed 5 weeks ago by andrew_b

Thanks!

mc-4572-sparse.c-fix-Wunused-macros-warning.patch​:
mc-4572-tar-internal.c-fix-Wunused-macros-warning.patch​:
mc-4572-usermenu.c-fix-Wunused-macros-warning.patch: these three patches are united to single commit.

mc-4572-widget-common.c-fix-Wanalyzer-deref-before-check-war.patch​: applied.

Changed 11 days ago by and

comment:14 Changed 11 days ago by andrew_b

mc-4572-Cleanup-cppcheck-warnings.patch​: applied.

Branch rebased to current master with resolution of various conflicts.

Changed 10 days ago by and

Changed 10 days ago by and

comment:15 Changed 9 days ago by andrew_b

mc-4572-fix-Glib-g_string_free-assertion.patch​: applied.
mc-4572-ftpfs.c-fix-error-handling.patch​: not sure. Probably, errno of connect() is meant there. So the patch is following:

  • src/vfs/ftpfs/ftpfs.c

    index 6eb9c2aaf..a9f807e35 100644
    a b ftpfs_open_socket (struct vfs_class *me, struct vfs_s_super *super) 
    935935        me->verrno = errno; 
    936936        close (my_socket); 
    937937 
    938         if (errno == EINTR && tty_got_interrupt ()) 
     938        if (me->verrno == EINTR && tty_got_interrupt ()) 
    939939            vfs_print_message ("%s", _("ftpfs: connection interrupted by user")); 
    940940        else if (res->ai_next == NULL) 
    941941            vfs_print_message (_("ftpfs: connection to server failed: %s"), 
Last edited 9 days ago by andrew_b (previous) (diff)

comment:16 Changed 9 days ago by and

Yes, you're right.
me->verrno aka errno from previous connect() function should test against EINTR

Last edited 9 days ago by and (previous) (diff)

Changed 8 days ago by and

comment:17 Changed 8 days ago by andrew_b

mc-4572-fix-garbage-return-value-message.patch​: applied.
Thanks!

Changed 7 days ago by and

comment:18 Changed 5 days ago by andrew_b

mc-4572-quick_c-fix-undefined-behaviour.patch​: applied.
Thanks!

Changed 5 days ago by and

comment:19 Changed 4 days ago by andrew_b

Thanks!

mc-4572-boxes_c-fix-uninitialized-value-function-call.patch​: applied.
mc-4572-editcmd_c-fix-uninitialized-value-function-call.patch​: applied.
mc-4572-editsearch_c-fix-uninitialized-value-and-null-pointer-dereference.patch​: applied.
mc-4572-listbox_c-fix-division-by-zero-warning.patch​: applied another fix.
mc-4572-quick_c-fix-memory-leak.patch​: applied.
mc-4572-util_c-fix-undefined-binary-operator-result.patch​: applied another fix.

Note: See TracTickets for help on using tickets.