{"thread":{"id":"33952","subject":"[PATCH RESEND v2] path: Fix a sparse warning","startedAt":"2013-05-27T19:24:56Z","lastAt":"2013-05-29T23:57:56Z","messageCount":4,"participants":["Ramsay Jones","Junio C Hamano","Torsten Bögershausen"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"218626","messageId":"51A3B308.6000201@ramsay1.demon.co.uk","threadId":"33952","inReplyTo":null,"subject":"[PATCH RESEND v2] path: Fix a sparse warning","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2013-05-27T19:24:56Z","receivedAt":"2013-05-27T19:24:56Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nOn MinGW, sparse issues an \"'get_st_mode_bits' not declared. Should\nit be static?\" warning. The MinGW and MSVC builds do not see the\ndeclaration of this function, within git-compat-util.h, due to its\nplacement within an preprocessor conditional.\n\nIn order to suppress the warning, we simply move the declaration to\nthe top level of the header.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nHi Junio,\n\nNow that v1.8.3 is out, I note that this patch seems to have been\ndropped (or did I miss something?).\n\nThis used to be\n\n    [PATCH 2/6] path: Make the 'get_st_mode_bits' symbol a file static\n\nbut the change in implementation required a change in title.\nThis version simply moves the declaration so that the MinGW and\nMSVC builds can see it.\n\nATB,\nRamsay Jones\n\n git-compat-util.h | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex e955bb5..0e5e4f8 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -163,7 +163,6 @@\n typedef long intptr_t;\n typedef unsigned long uintptr_t;\n #endif\n-int get_st_mode_bits(const char *path, int *mode);\n #if defined(__CYGWIN__)\n #undef _XOPEN_SOURCE\n #include <grp.h>\n@@ -176,6 +175,8 @@ int get_st_mode_bits(const char *path, int *mode);\n #endif\n #endif\n \n+extern int get_st_mode_bits(const char *path, int *mode);\n+\n /* used on Mac OS X */\n #ifdef PRECOMPOSE_UNICODE\n #include \"compat/precompose_utf8.h\"\n-- \n1.8.3\n"},{"id":"218677","messageId":"7vhahn2fz2.fsf@alter.siamese.dyndns.org","threadId":"33952","inReplyTo":"51A3B308.6000201@ramsay1.demon.co.uk","subject":"Re: [PATCH RESEND v2] path: Fix a sparse warning","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-05-28T17:04:33Z","receivedAt":"2013-05-28T17:04:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:\n\n> On MinGW, sparse issues an \"'get_st_mode_bits' not declared. Should\n> it be static?\" warning. The MinGW and MSVC builds do not see the\n> declaration of this function, within git-compat-util.h, due to its\n> placement within an preprocessor conditional.\n>\n> In order to suppress the warning, we simply move the declaration to\n> the top level of the header.\n>\n> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n> ---\n>\n> Hi Junio,\n>\n> Now that v1.8.3 is out, I note that this patch seems to have been\n> dropped (or did I miss something?).\n>\n> This used to be\n>\n>     [PATCH 2/6] path: Make the 'get_st_mode_bits' symbol a file static\n>\n> but the change in implementation required a change in title.\n> This version simply moves the declaration so that the MinGW and\n> MSVC builds can see it.\n\nWill queue.\n\nCan you tell me what the conclusion on the discussion on your two\nother patches on 'pu'?\n\n* rj/mingw-cygwin (2013-05-08) 2 commits\n - cygwin: Remove the CYGWIN_V15_WIN32API build variable\n - mingw: rename WIN32 cpp macro to GIT_WINDOWS_NATIVE\n\nI stopped keeping track of the discussion and my vague recollection\nwas that it is OK for 1.5 but not verified on 1.7 or something?\n\n>\n> ATB,\n> Ramsay Jones\n>\n>  git-compat-util.h | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git a/git-compat-util.h b/git-compat-util.h\n> index e955bb5..0e5e4f8 100644\n> --- a/git-compat-util.h\n> +++ b/git-compat-util.h\n> @@ -163,7 +163,6 @@\n>  typedef long intptr_t;\n>  typedef unsigned long uintptr_t;\n>  #endif\n> -int get_st_mode_bits(const char *path, int *mode);\n>  #if defined(__CYGWIN__)\n>  #undef _XOPEN_SOURCE\n>  #include <grp.h>\n> @@ -176,6 +175,8 @@ int get_st_mode_bits(const char *path, int *mode);\n>  #endif\n>  #endif\n>  \n> +extern int get_st_mode_bits(const char *path, int *mode);\n> +\n>  /* used on Mac OS X */\n>  #ifdef PRECOMPOSE_UNICODE\n>  #include \"compat/precompose_utf8.h\"\n"},{"id":"218835","messageId":"51A606A0.5060101@web.de","threadId":"33952","inReplyTo":"7vhahn2fz2.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH RESEND v2] path: Fix a sparse warning","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2013-05-29T13:46:08Z","receivedAt":"2013-05-29T13:46:08Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2013-05-28 19.04, Junio C Hamano wrote:\n> \n> Can you tell me what the conclusion on the discussion on your two\n> other patches on 'pu'?\n> \n> * rj/mingw-cygwin (2013-05-08) 2 commits\n>  - cygwin: Remove the CYGWIN_V15_WIN32API build variable\n>  - mingw: rename WIN32 cpp macro to GIT_WINDOWS_NATIVE\n> \n> I stopped keeping track of the discussion and my vague recollection\n> was that it is OK for 1.5 but not verified on 1.7 or something?\n> \n\nThe tests I did under cygwin 1.7 did not show any regression.\n/Torsten\n"},{"id":"218913","messageId":"51A69604.20500@ramsay1.demon.co.uk","threadId":"33952","inReplyTo":"51A606A0.5060101@web.de","subject":"Re: [PATCH RESEND v2] path: Fix a sparse warning","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2013-05-29T23:57:56Z","receivedAt":"2013-05-29T23:57:56Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Torsten Bögershausen wrote:\n> On 2013-05-28 19.04, Junio C Hamano wrote:\n>>\n>> Can you tell me what the conclusion on the discussion on your two\n>> other patches on 'pu'?\n>>\n>> * rj/mingw-cygwin (2013-05-08) 2 commits\n>>  - cygwin: Remove the CYGWIN_V15_WIN32API build variable\n>>  - mingw: rename WIN32 cpp macro to GIT_WINDOWS_NATIVE\n>>\n>> I stopped keeping track of the discussion and my vague recollection\n>> was that it is OK for 1.5 but not verified on 1.7 or something?\n>>\n> \n> The tests I did under cygwin 1.7 did not show any regression.\n\nThank you for testing this.\n\nATB,\nRamsay Jones\n"}]}