All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: xen-devel@lists.xenproject.org
Subject: [PATCH] Fix C compatibility issue in mini-os
Date: Fri, 15 Dec 2023 12:59:23 +0100	[thread overview]
Message-ID: <87edfn8yn8.fsf@oldenburg.str.redhat.com> (raw)

The cc-option check always fails (that, it picks the second option
unconditionally) if the compiler does not support implicit conversion
from integers to pointers.  Just drop the initialization because it
seems unnecessary in this context.

Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>

Signed-off-by: Florian Weimer <fweimer@redhat.com>

diff --git a/Config.mk b/Config.mk
index f2d1f0a..b7c9887 100644
--- a/Config.mk
+++ b/Config.mk
@@ -21,7 +21,7 @@ endef
 # of which would indicate an "unrecognized command-line option" warning/error.
 #
 # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
-cc-option = $(shell if test -z "`echo 'void*p=1;' | \
+cc-option = $(shell if test -z "`echo 'void*p;' | \
               $(1) $(2) -c -o /dev/null -x c - 2>&1 | grep -- $(2) -`"; \
               then echo "$(2)"; else echo "$(3)"; fi ;)
 



             reply	other threads:[~2023-12-15 11:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-15 11:59 Florian Weimer [this message]
2023-12-15 12:02 ` [PATCH] Fix C compatibility issue in mini-os Jan Beulich
2023-12-15 12:23   ` Florian Weimer
2023-12-15 12:29     ` Jan Beulich
2023-12-15 13:12       ` Juergen Gross

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=87edfn8yn8.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=xen-devel@lists.xenproject.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.