On Fri, Oct 05, 2007 at 05:57:01PM -0400, Josh Sled wrote: > Christian Stimming <[EMAIL PROTECTED]> writes: > > Your change, however, is a different expression: With your case, if the > > char > > pointer points to a non-empty string, use it, but otherwise use the pointer > > to an empty string. > > > > Which points me to the question: Which gcc warning did you try to fix here? > > The warning was "TransLog.c:254: warning: the address of 'drecn' will always > evaluate as 'true'". > > > > Looking more into context, it turns out drecn is a local char buffer > > anyway, > > hence it can't be NULL anyway. Because of this, here (and only here) you > > should replace the expresssion direcly by drecn, i.e. > > > > - drecn ? drecn : ""); > > + drecn); > > I suggested the {{{ drecn[0] == 0 ? [...] }}} form of the fix. > > Of course, "drecn[0] == 0" just means the string is already empty. > So, you're totally right; it should just be "drecn". > > But, there was a bit of a miscommunication about how to make the change, > anyways. As you'd quoted, if drecn[0] == 0, then the string drecn is empty, > and it'll be printed. Otherwise (when drecn actually has a value), it will > use "" instead.
whoops. that's not good! A
signature.asc
Description: Digital signature
_______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel