Re: [Mesa-dev] [PATCH] d3dadapter9: use snprintf(..., "%s", ...) instead of strncpy

2018-12-01 Thread Axel Davy
Well, OK, I guess these snprintf call are an acceptable solution then. Reviewed-by: Axel Davy On 26/11/2018 13:23, Andre Heider wrote: On 25/11/2018 17:23, Axel Davy wrote: Reading https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/ I think the snprintf

Re: [Mesa-dev] [PATCH] d3dadapter9: use snprintf(..., "%s", ...) instead of strncpy

2018-11-26 Thread Andre Heider
On 25/11/2018 17:23, Axel Davy wrote: Reading https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/ I think the snprintf variant suffers from the same issue, and the compiler is just not yet able to detect it, and send the same warning (but it might do in

Re: [Mesa-dev] [PATCH] d3dadapter9: use snprintf(..., "%s", ...) instead of strncpy

2018-11-25 Thread Axel Davy
Reading https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/ I think the snprintf variant suffers from the same issue, and the compiler is just not yet able to detect it, and send the same warning (but it might do in later gcc versions). Probably a better fix

[Mesa-dev] [PATCH] d3dadapter9: use snprintf(..., "%s", ...) instead of strncpy

2018-11-25 Thread Andre Heider
Fixes -Wstringop-truncation compiler warnings. See f836d799f9066adf58f36 "intel/decoder: use snprintf(..., "%s", ...) instead of strncpy" Signed-off-by: Andre Heider --- src/gallium/targets/d3dadapter9/description.c | 27 --- src/gallium/targets/d3dadapter9/drm.c | 8