rockchip-linux / rkdeveloptool

GNU General Public License v2.0
169 stars 98 forks source link

Fixed Build Failure - gcc 8.2.0 #31

Closed KL-Yang closed 5 years ago

KL-Yang commented 5 years ago

This 1 line change try to fix the following compile failure (one of the current open issue) error:

main.cpp:2841:10: error: ‘char strncpy(char, const char*, size_t)’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]

Since the allocation is only 100char, the reasonable fix would be limit the strncpy to only (100-1)char.

cmuellner commented 5 years ago

I just provided a more robust solution to the problem here: https://github.com/rockchip-linux/rkdeveloptool/pull/39

keveryang commented 5 years ago

Will apply #39

rkchrome commented 5 years ago

Revert it https://github.com/rockchip-linux/rkdeveloptool/commit/cd6053d2775184264b4e788d5be324e52b6f0eb9