From cf548cacdd0c553b6524969d0d3fd5e787efeb3c Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Tue, 4 Jan 2011 18:36:34 -0600 Subject: [PATCH] quote.h: simplify the inclusion MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Attempting to include quote.h without first including strbuf.h results in warnings: ./quote.h:33:33: warning: ‘struct strbuf’ declared inside parameter list ./quote.h:33:33: warning: its scope is only this definition or declaration, which is probably not what you want ./quote.h:34:34: warning: ‘struct strbuf’ declared inside parameter list ... Add a toplevel declaration for struct strbuf to avoid this. While at it, stop including system headers from quote.h. git source files already need to include git-compat-util.h sooner to ensure the appropriate feature test macros are defined. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- quote.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/quote.h b/quote.h index 38003bff5..024e21d80 100644 --- a/quote.h +++ b/quote.h @@ -1,8 +1,7 @@ #ifndef QUOTE_H #define QUOTE_H -#include -#include +struct strbuf; /* Help to copy the thing properly quoted for the shell safety. * any single quote is replaced with '\'', any exclamation point -- 2.30.2