Linux-Trace-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>,
	"linux-trace-devel@vger.kernel.org" 
	<linux-trace-devel@vger.kernel.org>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: Re: [PATCH] kernelshark: Make fontHeight() and stringWidth() static
Date: Mon, 11 May 2020 16:52:07 +0300
Message-ID: <3bf272bc-38f4-e283-1657-df08c124f9e1@gmail.com> (raw)
In-Reply-To: <20200510111720.2e041431@oasis.local.home>



On 10.05.20 г. 18:17 ч., Steven Rostedt wrote:
> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
> 
> Gcc 10 is much more picky about globals being defined in multiple objects
> even if they are the same function. The functions fontHeight() and
> stringWidth() are defined in a header file which places them in multiple
> objects. They need to be static otherwise gcc 10 will not be able to build.
> 
> Link: https://lore.kernel.org/linux-trace-devel/CADVatmN=Z0ASVXUBTyAu6F_TWoWiKiKsgm404rOx7Oh-a6LiQg@mail.gmail.com/
> 
> Reported-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

Hi Sudip and Steven,

Thanks a lot for reporting and fixing the problem!
Yordan


Reviewed-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>

> ---
>   kernel-shark/src/KsUtils.hpp | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel-shark/src/KsUtils.hpp b/kernel-shark/src/KsUtils.hpp
> index f44139bb..272a27d1 100644
> --- a/kernel-shark/src/KsUtils.hpp
> +++ b/kernel-shark/src/KsUtils.hpp
> @@ -32,7 +32,7 @@
>   
>   //! @cond Doxygen_Suppress
>   
> -auto fontHeight = []()
> +static auto fontHeight = []()
>   {
>   	QFont font;
>   	QFontMetrics fm(font);
> @@ -40,7 +40,7 @@ auto fontHeight = []()
>   	return fm.height();
>   };
>   
> -auto stringWidth = [](QString s)
> +static auto stringWidth = [](QString s)
>   {
>   	QFont font;
>   	QFontMetrics fm(font);
> 

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-10 15:17 Steven Rostedt
2020-05-11 13:52 ` Yordan Karadzhov (VMware) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3bf272bc-38f4-e283-1657-df08c124f9e1@gmail.com \
    --to=y.karadz@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sudipm.mukherjee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Trace-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-trace-devel/0 linux-trace-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-trace-devel linux-trace-devel/ https://lore.kernel.org/linux-trace-devel \
		linux-trace-devel@vger.kernel.org
	public-inbox-index linux-trace-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-trace-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git