git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 05/11] winansi: fix compile warnings

From
Johannes Sixt <j6t@kdbg.org>
Date
May 31, 2009, 18:03 UTC
Message-ID
<4A22C674.603@kdbg.org>
In-Reply-To
<1243786525-4493-6-git-send-email-prohaska@zib.de>
Steffen Prohaska schrieb:
Show 11 quoted lines
> diff --git a/compat/win32.h b/compat/win32.h
> index c26384e..d531130 100644
> --- a/compat/win32.h
> +++ b/compat/win32.h
> @@ -1,5 +1,6 @@
>  /* common Win32 functions for MinGW and Cygwin */
>  #include <windows.h>
> +#include <conio.h>
>  
>  static inline int file_attr_to_st_mode (DWORD attr)
>  {

I assume this is to remove the warning about missing declaration of _getch(). Can we have this patch instead? I don't have conio.h in my oldish MinGW environment.

diff --git a/compat/mingw.c b/compat/mingw.c
index 52961ee..53053ad 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -1211,6 +1211,9 @@ int link(const char *oldpath, const char *newpath)
  	return 0;
  }

+/* from conio.h */
+int _getch(void);  // FIXME: really look this up in conio.h!!!!
+
  char *getpass(const char *prompt)
  {
  	struct strbuf buf = STRBUF_INIT;

> diff --git a/compat/winansi.c b/compat/winansi.c
> index 4bee335..9217c24 100644
> --- a/compat/winansi.c
> +++ b/compat/winansi.c
> @@ -80,7 +80,7 @@ static void set_console_attr(void)
>  static void erase_in_line(void)
>  {
>  	CONSOLE_SCREEN_BUFFER_INFO sbi;
> -	long dummy; /* Needed for Windows 7 (or Vista) regression */
> +	DWORD dummy; /* Needed for Windows 7 (or Vista) regression */
>  
>  	if (!console)
>  		return;

This should really be squashed into 03/11, where the line is introduced.

-- Hannes
Previous: Steffen ProhaskaNext: Johannes Sixt
Message 10 of 37 in “Various msysgit patches”
  1. 00/11 Various msysgit patchesSteffen Prohaska, May 31, 2009
  2. 01/11 MinGW: GCC >= 4 does not need SNPRINTF_SIZE_CORR anymoreSteffen Prohaska, May 31, 2009
  3. 02/11 Quiet make: do not leave Windows behindSteffen Prohaska, May 31, 2009
  4. 03/11 Work around a regression in Windows 7, causing erase_in_line() to crash sometimesSteffen Prohaska, May 31, 2009
  5. 04/11 test-chmtime: work around Windows limitationSteffen Prohaska, May 31, 2009
  6. 05/11 winansi: fix compile warningsSteffen Prohaska, May 31, 2009
  7. 06/11 git: browsing paths with spaces when using the start commandSteffen Prohaska, May 31, 2009
  8. 07/11 connect.c: Support PuTTY plink and TortoisePlink as SSH on WindowsSteffen Prohaska, May 31, 2009
  9. 08/11 MinGW readdir reimplementation to support d_typeSteffen Prohaska, May 31, 2009
  10. Johannes SixtMay 31, 2009
  11. Johannes SixtMay 31, 2009
  12. 05/11 MinGW: fix warning about implicit declaration of _getch()Steffen Prohaska, Jun 1, 2009
  13. 03/11 Work around a regression in Windows 7, causing erase_in_line() to crash sometimesSteffen Prohaska, Jun 1, 2009
  14. Johannes SchindelinJun 1, 2009
  15. Steffen ProhaskaJun 1, 2009
  16. Johannes SchindelinJun 1, 2009
  17. Junio C HamanoJun 1, 2009
  18. Johannes SchindelinJun 1, 2009
  19. Johannes SixtMay 31, 2009
  20. 10/11 Fix warnings in nedmalloc when compiling with GCC 4.4.0Steffen Prohaska, May 31, 2009
  21. 11/11 MinGW: Teach Makefile to detect msysgit and apply specific settingsSteffen Prohaska, May 31, 2009
  22. Junio C HamanoJun 1, 2009
  23. Johannes SchindelinJun 1, 2009
  24. Junio C HamanoJun 1, 2009
  25. GeunSik LimJun 1, 2009
  26. Johannes SchindelinJun 2, 2009
  27. Junio C HamanoJun 2, 2009
  28. Johannes SchindelinJun 3, 2009
  29. Junio C HamanoJun 3, 2009
  30. 10/11 Fix warnings in nedmalloc when compiling with GCC 4.4.0Johannes Schindelin, Jun 8, 2009
  31. Junio C HamanoJun 8, 2009
  32. Johannes SixtJun 8, 2009
  33. Steffen ProhaskaJun 9, 2009
  34. Johannes SixtJun 10, 2009
  35. Fix typo in nedmalloc warning fixJohannes Sixt, Jun 11, 2009
  36. compat/ has subdirectories: do not omit them in 'make clean'Johannes Sixt, Jun 11, 2009
  37. Johannes SchindelinJun 11, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.