Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation issue - ‘__builtin_strncpy’ output may be truncated #233

Open
marpioch opened this issue Oct 7, 2021 · 0 comments
Open

Comments

@marpioch
Copy link

marpioch commented Oct 7, 2021

BUG REPORT:

Compilation issue:

How to reproduce it (as minimally and precisely as possible):
Issue make command

Anything else we need to know?:
Output:

In function ‘strncpy’,
    inlined from ‘pxd_fastpath_update’ at /root/workspace/px-fuse/pxd.c:1962:3:
./include/linux/string.h:245:9: error: ‘__builtin_strncpy’ output may be truncated copying 127 bytes from a string of length 255 [-Werror=stringop-truncation]
  245 |  return __builtin_strncpy(p, q, size);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Environment:
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant