Skip to content

Commit cf548ca

Browse files
jrngitster
authored andcommitted
quote.h: simplify the inclusion
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c4d9986 commit cf548ca

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

quote.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#ifndef QUOTE_H
22
#define QUOTE_H
33

4-
#include <stddef.h>
5-
#include <stdio.h>
4+
struct strbuf;
65

76
/* Help to copy the thing properly quoted for the shell safety.
87
* any single quote is replaced with '\'', any exclamation point

0 commit comments

Comments
 (0)