lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Improve relocation debug messages. (issue 347070043 by address@hidde


From: dak
Subject: Re: Improve relocation debug messages. (issue 347070043 by address@hidden)
Date: Fri, 08 Feb 2019 04:05:10 -0800

On 2019/02/08 11:41:45, lemzwerg wrote:
> Can you give any reason why it _should_ work rather than "I tried"?

flower/include/international.hh:46

Oh good grief.

string _f (char const *format, ...)
__attribute__ ((format (printf, 1, 2)));
string _f (char const *format, const string &s, const string &s2 = "",
const string &s3 = "");

So this is a format-like string unless there follow 1 to 3 C++ strings
(or types convertible to strings) in which case GCC does not get to
check argument consistency.  And the code then does

string
_f (char const *format, const string &s, const string &s2, const string
&s3)
{
  return String_convert::form_string (gettext (format), s.c_str (),
s2.c_str (),
                                      s3.c_str ());
}

anyway.  Frankly, my approach would be to throw that function out.  It
just obfuscates what will and what will not work and keeps GCC from
issuing warnings when number and uses of %s don't match.

https://codereview.appspot.com/347070043/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]