LinearTapeFileSystem / LinearTapeFileSystem/ltfs
Linux compilation warnings(4)
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 352
- Forks
- 110
- Avg merge
- 2h 50m
- Merged PRs (30d)
- 2
Description
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));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Fedora 34 build with gcc 11.1.1 and the reported OPT_FLAGS settings, then inspect the warnings in tape.c, pathname.c, and ltfstrace.c. Determine the scope of the 929 warnings and use the listed warning locations to define which diagnostics are addressed; done means the relevant warnings are resolved or clearly accounted for.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100