public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][pushed] analyzer: fix -Wformat warnings on i686
@ 2022-01-27 11:45 Martin Liška
  0 siblings, 0 replies; only message in thread
From: Martin Liška @ 2022-01-27 11:45 UTC (permalink / raw)
  To: gcc-patches

Pushed as obvious.

Martin

	PR analyzer/104247

gcc/analyzer/ChangeLog:

	* constraint-manager.cc (bounded_ranges_manager::log_stats):
	Cast to long for format purpose.
	* region-model-manager.cc (log_uniq_map): Likewise.
---
  gcc/analyzer/constraint-manager.cc   | 2 +-
  gcc/analyzer/region-model-manager.cc | 4 ++--
  2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/analyzer/constraint-manager.cc b/gcc/analyzer/constraint-manager.cc
index 88b0988513a..ac1e4feaee5 100644
--- a/gcc/analyzer/constraint-manager.cc
+++ b/gcc/analyzer/constraint-manager.cc
@@ -1031,7 +1031,7 @@ void
  bounded_ranges_manager::log_stats (logger *logger, bool show_objs) const
  {
    LOG_SCOPE (logger);
-  logger->log ("  # %s: %li", "ranges", m_map.elements ());
+  logger->log ("  # %s: %li", "ranges", (long)m_map.elements ());
    if (!show_objs)
      return;
  
diff --git a/gcc/analyzer/region-model-manager.cc b/gcc/analyzer/region-model-manager.cc
index e765e7f484f..ba835cba22c 100644
--- a/gcc/analyzer/region-model-manager.cc
+++ b/gcc/analyzer/region-model-manager.cc
@@ -1573,7 +1573,7 @@ static void
  log_uniq_map (logger *logger, bool show_objs, const char *title,
  	      const hash_map<K, T*> &uniq_map)
  {
-  logger->log ("  # %s: %li", title, uniq_map.elements ());
+  logger->log ("  # %s: %li", title, (long)uniq_map.elements ());
    if (!show_objs)
      return;
    auto_vec<const T *> vec_objs (uniq_map.elements ());
@@ -1597,7 +1597,7 @@ static void
  log_uniq_map (logger *logger, bool show_objs, const char *title,
  	      const consolidation_map<T> &map)
  {
-  logger->log ("  # %s: %li", title, map.elements ());
+  logger->log ("  # %s: %li", title, (long)map.elements ());
    if (!show_objs)
      return;
  
-- 
2.34.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-27 11:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27 11:45 [PATCH][pushed] analyzer: fix -Wformat warnings on i686 Martin Liška

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).