Re: [PATCH, libcpp]: Check the result of vasprintf

2014-12-09 Thread Joseph Myers
On Tue, 9 Dec 2014, Uros Bizjak wrote: > Attached patch checks the return value and sets ptr to NULL in this case. > > 2014-12-09 Uros Bizjak > > * directives.c (cpp_define_formatted): Check return value of > vasprintf and in case of error set ptr to NULL. > > Bootstrapped on x86_64-

[PATCH, libcpp]: Check the result of vasprintf

2014-12-09 Thread Uros Bizjak
Hello! The compilation with gentoo glibc 2.20 emits following warning: ../../../gcc-svn/trunk/libcpp/directives.c:2411:28: warning: ignoring return value of ‘int vasprintf(char**, const char*, __gnuc_va_list)’, declared with attribute warn_unused_result [-Wunused-result] The manpage says: If me