Skip to content

Linux compilation warnings(4) #280

Description

@xosevp

Fedora 34 x86_64 - kernel-5.11.20 - glibc-2.33 - gcc-11.1.1

BTW, if "-W and -Wall" are added to OPT_FLAGS= , it generates a lot of warnings(929)

tape.c: In function ‘set_tape_attribute’:
tape.c:2946:9: warning: ‘strncpy’ output truncated copying 8 bytes from a string of length 16 [-Wstringop-truncation]
 2946 |         strncpy(t_attr->app_ver, PACKAGE_VERSION, TC_MAM_APP_VERSION_SIZE);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

pathname.c: In function ‘_unorm_quickCheck’:
pathname.c:674:9: warning: ‘unorm_quickCheck_67’ is deprecated [-Wdeprecated-declarations]
  674 |         return unorm_quickCheck(src, -1, nfc ? UNORM_NFC : UNORM_NFD, err);
      |         ^~~~~~
In file included from /usr/include/unicode/platform.h:25,
                 from /usr/include/unicode/ptypes.h:52,
                 from /usr/include/unicode/umachine.h:46,
                 from /usr/include/unicode/utypes.h:38,
                 from /usr/include/unicode/uchar.h:28,
                 from pathname.c:66:
/usr/include/unicode/unorm.h:244:1: note: declared here
  244 | unorm_quickCheck(const UChar *source, int32_t sourcelength,
      | ^~~~~~~~~~~~~~~~

pathname.c: In function ‘_unorm_normalize’:
pathname.c:686:9: warning: ‘unorm_normalize_67’ is deprecated [-Wdeprecated-declarations]
  686 |         return unorm_normalize(src, -1, nfc ? UNORM_NFC : UNORM_NFD, 0, dest ? *dest : NULL, len, err);
      |         ^~~~~~
In file included from /usr/include/unicode/platform.h:25,
                 from /usr/include/unicode/ptypes.h:52,
                 from /usr/include/unicode/umachine.h:46,
                 from /usr/include/unicode/utypes.h:38,
                 from /usr/include/unicode/uchar.h:28,
                 from pathname.c:66:
/usr/include/unicode/unorm.h:218:1: note: declared here
  218 | unorm_normalize(const UChar *source, int32_t sourceLength,
      | ^~~~~~~~~~~~~~~

ltfstrace.c: In function ‘ltfs_header_init’:
ltfstrace.c:489:9: warning: ‘strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length [-Wstringop-truncation]
  489 |         strncpy(trc_header->signature, LTFS_TRACE_SIGNATURE, strlen(LTFS_TRACE_SIGNATURE));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions