1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-08 19:34:14 -04:00
profanity/src
Michael Vetter 64d5f938fd Fix gcc8 error about strncpy
With gcc8 we get the following error when stringop-truncation is on:

```
In function ‘_rotate_log_file’,
    inlined from ‘log_msg.part.2’ at src/log.c:201:17:
src/log.c:231:5: error: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
     strncpy(log_file_new, log_file, len);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/log.c: In function ‘log_msg.part.2’:
src/log.c:228:18: note: length computed here
     size_t len = strlen(log_file);
                  ^~~~~~~~~~~~~~~~
```

Using memcpy instead of strncpy.
2018-07-06 11:31:20 +02:00
..
command Add max tab length to statusbar 2018-03-11 01:18:46 +00:00
config Fix theme load max tab length 2018-03-11 01:21:36 +00:00
event Add preferences for tab display 2018-03-09 21:15:27 +00:00
otr Update copyright 2018-01-21 15:00:02 +00:00
pgp Update copyright 2018-01-21 15:00:02 +00:00
plugins Add preferences for tab display 2018-03-09 21:15:27 +00:00
tools Update copyright 2018-01-21 15:00:02 +00:00
ui Add max tab length to statusbar 2018-03-11 01:18:46 +00:00
xmpp Fix muc nick autocomplete colon mid message 2018-02-09 20:47:41 +00:00
common.c Update copyright 2018-01-21 15:00:02 +00:00
common.h Update copyright 2018-01-21 15:00:02 +00:00
log.c Fix gcc8 error about strncpy 2018-07-06 11:31:20 +02:00
log.h Update copyright 2018-01-21 15:00:02 +00:00
main.c Update copyright 2018-01-21 15:00:02 +00:00
profanity.c Update copyright 2018-01-21 15:00:02 +00:00
profanity.h Update copyright 2018-01-21 15:00:02 +00:00