Skip to content

gcc10 warnings (via haven/CRAN) #202

@hadley

Description

@hadley
In file included from /usr/include/string.h:495,
                 from readstat/sas/../readstat.h:16,
                 from readstat/sas/readstat_xport_write.c:6:
In function ‘strncpy’,
    inlined from ‘copypad’ at readstat/sas/readstat_xport_write.c:16:5,
    inlined from ‘xport_write_variables’ at readstat/sas/readstat_xport_write.c:98:9:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output may be truncated copying 8 bytes from a string of length 299 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘copypad’ at readstat/sas/readstat_xport_write.c:16:5,
    inlined from ‘xport_write_variables’ at readstat/sas/readstat_xport_write.c:99:9:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output may be truncated copying 40 bytes from a string of length 1023 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘copypad’ at readstat/sas/readstat_xport_write.c:16:5,
    inlined from ‘xport_write_variables’ at readstat/sas/readstat_xport_write.c:108:13:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output may be truncated copying 8 bytes from a string of length 23 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘copypad’ at readstat/sas/readstat_xport_write.c:16:5,
    inlined from ‘xport_write_variables’ at readstat/sas/readstat_xport_write.c:125:13:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output may be truncated copying 32 bytes from a string of length 299 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));

(full context at https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-gcc/haven-00install.html)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions