Re: [Mesa-dev] [PATCH] mesa/util: add missing va_end() after va_copy()

2018-09-06 Thread andrey simiklit
On Thu, Sep 6, 2018 at 3:20 PM Emil Velikov wrote: > Hi Andrii, > > I think you might be overthinking my comments. > There's nothing special, nor am I trying to force my opinion. > > If you think my suggestions make sense, great. Otherwise don't bother too > much. > Thanks a lot for your advices

Re: [Mesa-dev] [PATCH] mesa/util: add missing va_end() after va_copy()

2018-09-06 Thread Emil Velikov
Hi Andrii, I think you might be overthinking my comments. There's nothing special, nor am I trying to force my opinion. If you think my suggestions make sense, great. Otherwise don't bother too much. HTH Emil ___ mesa-dev mailing list mesa-dev@lists.fr

Re: [Mesa-dev] [PATCH] mesa/util: add missing va_end() after va_copy()

2018-09-06 Thread asimiklit.w...@gmail.com
Hello, Thanks for your reply. The 'util_vsnprintf' function under Linux is just an alias for 'vsnprintf': #define util_vsnprintf vsnprintf So as far as I understood we should ensure compatibility between 'vsnprintf' function under Linux and '_vsnprintf' function under Windows using our wrapper

Re: [Mesa-dev] [PATCH] mesa/util: add missing va_end() after va_copy()

2018-09-05 Thread Emil Velikov
On 5 September 2018 at 13:03, asimiklit.w...@gmail.com wrote: > Hello, > > Thanks for your reply. > > I think that we just misunderstand each other) > > static inline int > util_vsnprintf(char *str, size_t size, const char *format, va_list ap) > { >/* We need to use _vscprintf to calculate the

Re: [Mesa-dev] [PATCH] mesa/util: add missing va_end() after va_copy()

2018-09-05 Thread asimiklit.w...@gmail.com
Hello, Thanks for your reply. I think that we just misunderstand each other) static inline int util_vsnprintf(char *str, size_t size, const char *format, va_list ap) { /* We need to use _vscprintf to calculate the length as vsnprintf returns -1 * if the number of characters to write i

Re: [Mesa-dev] [PATCH] mesa/util: add missing va_end() after va_copy()

2018-09-04 Thread Emil Velikov
On 4 September 2018 at 10:04, andrey simiklit wrote: > Hi, > > Thanks for your reply. > >> These WIN32 compat functions seem iffy. >> Namely - often we'll issue a va_copy only to use the original va. > > > As far as I found there is the following reason to use va_copy: > > https://linux.die.net/ma

Re: [Mesa-dev] [PATCH] mesa/util: add missing va_end() after va_copy()

2018-09-04 Thread andrey simiklit
Hi, Thanks for your reply. These WIN32 compat functions seem iffy. > Namely - often we'll issue a va_copy only to use the original va. > As far as I found there is the following reason to use va_copy: https://linux.die.net/man/3/vsnprintf "These functions do not call the va_end macro. Because t

Re: [Mesa-dev] [PATCH] mesa/util: add missing va_end() after va_copy()

2018-09-03 Thread Emil Velikov
On 3 September 2018 at 15:49, wrote: > From: Andrii Simiklit > > MSDN: > "va_end must be called on each argument list that's initialized > with va_start or va_copy before the function returns." > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107810 > Signed-off-by: Andrii Simiklit >

[Mesa-dev] [PATCH] mesa/util: add missing va_end() after va_copy()

2018-09-03 Thread asimiklit . work
From: Andrii Simiklit MSDN: "va_end must be called on each argument list that's initialized with va_start or va_copy before the function returns." Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107810 Signed-off-by: Andrii Simiklit --- src/util/u_string.h | 1 + 1 file changed, 1 ins