[pacman-dev] [PATCH] Prevent warnings with unchecked asprintf and FORTIFY_SOURCE
aepd87 at gmail.com
Mon Jun 28 00:56:37 EDT 2010
On Mon, Jun 28, 2010 at 12:11 AM, Allan McRae <allan at archlinux.org> wrote:
>> +/* error handling in a single fn please */
> Seriously, this is one of the my useless pieces of function documentation I
> have ever seen.
Call it wishful thinking?
>> +void vw_asprintf(char **str, const char *fmt, ...)
> Why "vw_"? We have several other similar wrappers called pm_<foo> in util.c
> already, so stick with that naming for consistency.
> Also, add the function proto to util.h.
I hope you don't do that since noone that includes util.h uses
asprintf. This wrapper is useless outside util.c for the time being.
Obviously prefixing it with pm_ is retarded since, as I said, it gets no use
outside were it's defined...
> As an aside, it was obvious that this was something I was working on. So
> duplicating the work is a waste of both of our time. On that note, do not
> bother resubmitting with my comments addressed as it would make the patch
> almost identical to what I have locally.
Um, I explicitely said in the patch that I disagreed with it. If that's not
indicative that I don't intend for this to be a commit, I don't know what is. I
was showing you how to do it with a function without copy pasting everything.
Also, good thing that this whole asprintf "issue" made me realize that
pacman isn't ansi at all.
More information about the pacman-dev