phoenix-rtos / phoenix-rtos-hostutils

Phoenix-RTOS supporting daemon
BSD 3-Clause "New" or "Revised" License
1 stars 5 forks source link

psdisk: remove warnings from strncpy #24

Closed HBuczynski closed 3 years ago

HBuczynski commented 3 years ago

JIRA: RTOS-61

Description

Changed count value in strncpy function. Instead of using a source's size, there is used a max size of destination string. If the source's size is shorter than count, the strncpy will add a null character to the destination string.

Motivation and Context

The following change removes warnings which appear in gcc version > 9.

Types of changes

How Has This Been Tested?

Checklist:

Special treatment

nalajcie commented 3 years ago

Linked to https://github.com/phoenix-rtos/phoenix-rtos-project/issues/141