linux/drivers/staging/speakup
Guenter Roeck fd29edc723 staging: speakup: Replace strncpy with memcpy
gcc 8.1.0 generates the following warnings.

drivers/staging/speakup/kobjects.c: In function 'punc_store':
drivers/staging/speakup/kobjects.c:522:2: warning:
	'strncpy' output truncated before terminating nul
	copying as many bytes from a string as its length
drivers/staging/speakup/kobjects.c:504:6: note: length computed here

drivers/staging/speakup/kobjects.c: In function 'synth_store':
drivers/staging/speakup/kobjects.c:391:2: warning:
	'strncpy' output truncated before terminating nul
	copying as many bytes from a string as its length
drivers/staging/speakup/kobjects.c:388:8: note: length computed here

Using strncpy() is indeed less than perfect since the length of data to
be copied has already been determined with strlen(). Replace strncpy()
with memcpy() to address the warning and optimize the code a little.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02 10:39:06 +02:00
..
buffers.c staging: speakup: use true/false instead of 1/0 2018-05-15 09:31:38 +02:00
DefaultKeyAssignments
devsynth.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fakekey.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
i18n.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
i18n.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig mn10300: Remove the architecture 2018-03-09 23:19:56 +01:00
keyhelp.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
kobjects.c staging: speakup: Replace strncpy with memcpy 2018-07-02 10:39:06 +02:00
main.c staging: speakup: use true/false instead of 1/0 2018-05-15 09:31:38 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
selection.c staging: speakup: selection: replace _manual_ swap with swap macro 2017-11-27 09:20:40 +01:00
serialio.c staging: speakup: add SPDX identifier. 2018-01-15 16:03:44 +01:00
serialio.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
speakup_acnt.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
speakup_acntpc.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
speakup_acntsa.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
speakup_apollo.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
speakup_audptr.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
speakup_bns.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
speakup_decext.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
speakup_decpc.c staging: speakup: match alignment with open parenthesis 2018-03-06 04:01:10 -08:00
speakup_dectlk.c staging: speakup: match alignment with open parenthesis 2018-03-06 04:01:10 -08:00
speakup_dtlk.c staging: speakup: remove space after a cast 2018-02-23 09:54:57 +01:00
speakup_dtlk.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
speakup_dummy.c staging: speakup: Add pause command used on switching to graphical mode 2018-05-06 19:02:37 -07:00
speakup_keypc.c staging: speakup: match alignment with open parenthesis 2018-03-06 04:01:10 -08:00
speakup_ltlk.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
speakup_soft.c staging: speakup: Add pause command used on switching to graphical mode 2018-05-06 19:02:37 -07:00
speakup_spkout.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
speakup_txprt.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
speakup.h staging: speakup: Add pause command used on switching to graphical mode 2018-05-06 19:02:37 -07:00
speakupmap.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
speakupmap.map
spk_priv_keyinfo.h staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
spk_priv.h staging: speakup: Add unicode support to the speakup_dummy driver 2018-03-14 12:57:45 +01:00
spk_ttyio.c staging: speakup: Add blank line after declaration 2018-03-19 17:14:40 +01:00
spk_types.h staging: speakup: refactor synths array to use a list 2018-06-17 09:05:11 +02:00
spkguide.txt
synth.c staging: speakup: refactor synths array to use a list 2018-06-17 09:05:11 +02:00
thread.c staging: speakup: add SPDX identifier. 2018-01-15 16:03:44 +01:00
TODO
varhandlers.c staging: speakup: Add pause command used on switching to graphical mode 2018-05-06 19:02:37 -07:00