All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/12] meson.build: remove -DCURL_DISABLE_TYPECHECK
@ 2025-03-15  2:46 Ramsay Jones
  2025-03-19 13:36 ` Patrick Steinhardt
  0 siblings, 1 reply; 2+ messages in thread
From: Ramsay Jones @ 2025-03-15  2:46 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: GIT Mailing-list, Patrick Steinhardt, Adam Dinwoodie


Commit 9371322a60 ("sparse: suppress some \"using sizeof on a function\"
warnings", 2013-10-06) used target-specific variable assignments to add
-DCURL_DISABLE_TYPECHECK to SPARSE_FLAGS for each of the files affected
by the "typecheck-gcc.h" warnings. (http-push.c, http.c, http-walker.c
and remote-curl.c).

These warnings are only issued by sparse, and not by gcc, so we do not
want to disable the 'type checking' for non-sparse targets. The meson
build does not provide any sparse targets, so there is no need to use
the CURL_DISABLE_TYPECHECK preprocessor flag with the c compiler.

In order to re-enable the curl 'type checking' in the meson build, remove
the assignment of -DCURL_DISABLE_TYPECHECK to libgit_c_args.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
 meson.build | 1 -
 1 file changed, 1 deletion(-)

diff --git a/meson.build b/meson.build
index efe2871c9d..88a29fd043 100644
--- a/meson.build
+++ b/meson.build
@@ -966,7 +966,6 @@ if curl.found()
   # Most executables don't have to link against libcurl, but we still need its
   # include directories so that we can resolve LIBCURL_VERSION in "help.c".
   libgit_dependencies += curl.partial_dependency(includes: true)
-  libgit_c_args += '-DCURL_DISABLE_TYPECHECK'
   build_options_config.set('NO_CURL', '')
 else
   libgit_c_args += '-DNO_CURL'
-- 
2.49.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 01/12] meson.build: remove -DCURL_DISABLE_TYPECHECK
  2025-03-15  2:46 [PATCH 01/12] meson.build: remove -DCURL_DISABLE_TYPECHECK Ramsay Jones
@ 2025-03-19 13:36 ` Patrick Steinhardt
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick Steinhardt @ 2025-03-19 13:36 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: Junio C Hamano, GIT Mailing-list, Adam Dinwoodie

On Sat, Mar 15, 2025 at 02:46:23AM +0000, Ramsay Jones wrote:
> 
> Commit 9371322a60 ("sparse: suppress some \"using sizeof on a function\"
> warnings", 2013-10-06) used target-specific variable assignments to add
> -DCURL_DISABLE_TYPECHECK to SPARSE_FLAGS for each of the files affected
> by the "typecheck-gcc.h" warnings. (http-push.c, http.c, http-walker.c
> and remote-curl.c).
> 
> These warnings are only issued by sparse, and not by gcc, so we do not
> want to disable the 'type checking' for non-sparse targets. The meson
> build does not provide any sparse targets, so there is no need to use
> the CURL_DISABLE_TYPECHECK preprocessor flag with the c compiler.
> 
> In order to re-enable the curl 'type checking' in the meson build, remove
> the assignment of -DCURL_DISABLE_TYPECHECK to libgit_c_args.
> 
> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>

Makes sense indeed.

Patrick

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-19 13:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-15  2:46 [PATCH 01/12] meson.build: remove -DCURL_DISABLE_TYPECHECK Ramsay Jones
2025-03-19 13:36 ` Patrick Steinhardt

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.