winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
December 2008
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1225 discussions
Start a n
N
ew thread
Michael Stefaniuc : wnaspi32: Replace malloc with HeapAlloc.
by Alexandre Julliard
05 Dec '08
05 Dec '08
Module: wine Branch: master Commit: 81f919fd374b1bb2ba842b4b44f8aaa9b7190cbb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=81f919fd374b1bb2ba842b4b4…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Fri Dec 5 07:48:19 2008 +0100 wnaspi32: Replace malloc with HeapAlloc. --- dlls/wnaspi32/winaspi16.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/wnaspi32/winaspi16.c b/dlls/wnaspi32/winaspi16.c index 4209082..17d6a6c 100644 --- a/dlls/wnaspi32/winaspi16.c +++ b/dlls/wnaspi32/winaspi16.c @@ -252,7 +252,7 @@ ASPI_ExecScsiCmd(DWORD ptrPRB, UINT16 mode) if (HOST_TO_TARGET(lpPRB)) { /* send header, command, and then data */ in_len = SCSI_OFF + lpPRB->SRB_CDBLen + lpPRB->SRB_BufLen; - sg_hd = (struct sg_header *) malloc(in_len); + sg_hd = HeapAlloc(GetProcessHeap(), 0, in_len); memset(sg_hd, 0, SCSI_OFF); memcpy(sg_hd + 1, &lpPRB->CDBByte[0], lpPRB->SRB_CDBLen); if (lpPRB->SRB_BufLen) { @@ -262,20 +262,20 @@ ASPI_ExecScsiCmd(DWORD ptrPRB, UINT16 mode) else { /* send header and command - no data */ in_len = SCSI_OFF + lpPRB->SRB_CDBLen; - sg_hd = (struct sg_header *) malloc(in_len); + sg_hd = HeapAlloc(GetProcessHeap(), 0, in_len); memset(sg_hd, 0, SCSI_OFF); memcpy(sg_hd + 1, &lpPRB->CDBByte[0], lpPRB->SRB_CDBLen); } if (TARGET_TO_HOST(lpPRB)) { out_len = SCSI_OFF + lpPRB->SRB_BufLen; - sg_reply_hdr = (struct sg_header *) malloc(out_len); + sg_reply_hdr = HeapAlloc(GetProcessHeap(), 0, out_len); memset(sg_reply_hdr, 0, SCSI_OFF); sg_hd->reply_len = out_len; } else { out_len = SCSI_OFF; - sg_reply_hdr = (struct sg_header *) malloc(out_len); + sg_reply_hdr = HeapAlloc(GetProcessHeap(), 0, out_len); memset(sg_reply_hdr, 0, SCSI_OFF); sg_hd->reply_len = out_len; } @@ -343,8 +343,8 @@ ASPI_ExecScsiCmd(DWORD ptrPRB, UINT16 mode) } } - free(sg_reply_hdr); - free(sg_hd); + HeapFree(GetProcessHeap(), 0, sg_reply_hdr); + HeapFree(GetProcessHeap(), 0, sg_hd); ASPI_DebugPrintResult(lpPRB, mode); return SS_COMP; @@ -362,8 +362,8 @@ error_exit: * We probably should set lpPRB->SRB_TargStat, SRB_HaStat ? */ WARN("error_exit\n"); - free(sg_reply_hdr); - free(sg_hd); + HeapFree(GetProcessHeap(), 0, sg_reply_hdr); + HeapFree(GetProcessHeap(), 0, sg_hd); return lpPRB->SRB_Status; } #endif
1
0
0
0
Michael Stefaniuc : quartz: Don't cast zero.
by Alexandre Julliard
05 Dec '08
05 Dec '08
Module: wine Branch: master Commit: 1a18b797eb0f209eb04a0c02c3619756eb3598d4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1a18b797eb0f209eb04a0c02c…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Fri Dec 5 07:47:42 2008 +0100 quartz: Don't cast zero. --- dlls/quartz/systemclock.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/systemclock.c b/dlls/quartz/systemclock.c index 88ac7ad..a971993 100644 --- a/dlls/quartz/systemclock.c +++ b/dlls/quartz/systemclock.c @@ -260,7 +260,7 @@ static HRESULT WINAPI SystemClockImpl_AdviseTime(IReferenceClock* iface, REFEREN TRACE("(%p, 0x%s, 0x%s, %ld, %p)\n", This, wine_dbgstr_longlong(rtBaseTime), wine_dbgstr_longlong(rtStreamTime), hEvent, pdwAdviseCookie); - if ((HEVENT) 0 == hEvent) { + if (!hEvent) { return E_INVALIDARG; } if (0 >= rtBaseTime + rtStreamTime) { @@ -296,7 +296,7 @@ static HRESULT WINAPI SystemClockImpl_AdvisePeriodic(IReferenceClock* iface, REF TRACE("(%p, 0x%s, 0x%s, %ld, %p)\n", This, wine_dbgstr_longlong(rtStartTime), wine_dbgstr_longlong(rtPeriodTime), hSemaphore, pdwAdviseCookie); - if ((HSEMAPHORE) 0 == hSemaphore) { + if (!hSemaphore) { return E_INVALIDARG; } if (0 >= rtStartTime || 0 >= rtPeriodTime) {
1
0
0
0
Michael Stefaniuc : msxml3: Do not cast void pointers to other pointer types.
by Alexandre Julliard
05 Dec '08
05 Dec '08
Module: wine Branch: master Commit: 328f60a6865e0c939d6807d6c160cff4c8497085 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=328f60a6865e0c939d6807d6c…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Fri Dec 5 07:47:27 2008 +0100 msxml3: Do not cast void pointers to other pointer types. --- dlls/msxml3/element.c | 2 +- dlls/msxml3/node.c | 2 +- dlls/msxml3/saxreader.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/msxml3/element.c b/dlls/msxml3/element.c index 4b9bf6c..a31f80e 100644 --- a/dlls/msxml3/element.c +++ b/dlls/msxml3/element.c @@ -478,7 +478,7 @@ static HRESULT WINAPI domelem_get_tagName( len = MultiByteToWideChar( CP_UTF8, 0, (LPCSTR) element->name, -1, NULL, 0 ); if (element->ns) len += MultiByteToWideChar( CP_UTF8, 0, (LPCSTR) element->ns->prefix, -1, NULL, 0 ); - str = (LPWSTR) HeapAlloc( GetProcessHeap(), 0, len * sizeof (WCHAR) ); + str = HeapAlloc( GetProcessHeap(), 0, len * sizeof (WCHAR) ); if ( !str ) return E_OUTOFMEMORY; if (element->ns) diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c index aa3b748..3169f35 100644 --- a/dlls/msxml3/node.c +++ b/dlls/msxml3/node.c @@ -257,7 +257,7 @@ BSTR bstr_from_xmlChar( const xmlChar *buf ) return NULL; len = MultiByteToWideChar( CP_UTF8, 0, (LPCSTR) buf, -1, NULL, 0 ); - str = (LPWSTR) HeapAlloc( GetProcessHeap(), 0, len * sizeof (WCHAR) ); + str = HeapAlloc( GetProcessHeap(), 0, len * sizeof (WCHAR) ); if ( !str ) return NULL; MultiByteToWideChar( CP_UTF8, 0, (LPCSTR) buf, -1, str, len ); diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 8370af0..17a3334 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -161,7 +161,7 @@ static BSTR bstr_from_xmlCharN(const xmlChar *buf, int len) dLen = MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)buf, len, NULL, 0); if(len != -1) dLen++; - str = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, dLen * sizeof (WCHAR)); + str = HeapAlloc(GetProcessHeap(), 0, dLen * sizeof (WCHAR)); if (!str) return NULL; MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)buf, len, str, dLen);
1
0
0
0
Michael Stefaniuc : msrle32: Remove some superfluous casts.
by Alexandre Julliard
05 Dec '08
05 Dec '08
Module: wine Branch: master Commit: 819ad6417b650d75d2416256f37d17c109886164 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=819ad6417b650d75d2416256f…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Fri Dec 5 07:46:40 2008 +0100 msrle32: Remove some superfluous casts. --- dlls/msrle32/msrle32.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/msrle32/msrle32.c b/dlls/msrle32/msrle32.c index 41ad22e..6fa8e87 100644 --- a/dlls/msrle32/msrle32.c +++ b/dlls/msrle32/msrle32.c @@ -1136,7 +1136,7 @@ static CodecInfo* Open(LPICOPEN icinfo) return NULL; } - pi = (CodecInfo*)LocalAlloc(LPTR, sizeof(CodecInfo)); + pi = LocalAlloc(LPTR, sizeof(CodecInfo)); if (pi != NULL) { pi->fccHandler = icinfo->fccHandler; @@ -1165,7 +1165,7 @@ static LRESULT Close(CodecInfo *pi) if (pi->pPrevFrame != NULL || pi->pCurFrame != NULL) CompressEnd(pi); - LocalFree((HLOCAL)pi); + LocalFree(pi); return 1; } @@ -1419,7 +1419,7 @@ static LRESULT CompressBegin(CodecInfo *pi, LPCBITMAPINFOHEADER lpbiIn, switch (lpbiOut->biBitCount) { case 4: case 8: - pi->palette_map = (LPBYTE)LocalAlloc(LPTR, lpbiIn->biClrUsed); + pi->palette_map = LocalAlloc(LPTR, lpbiIn->biClrUsed); if (pi->palette_map == NULL) { CompressEnd(pi); return ICERR_MEMORY; @@ -1669,7 +1669,7 @@ static LRESULT DecompressBegin(CodecInfo *pi, LPCBITMAPINFOHEADER lpbiIn, switch (lpbiOut->biBitCount) { case 4: case 8: - pi->palette_map = (LPBYTE)LocalAlloc(LPTR, lpbiIn->biClrUsed); + pi->palette_map = LocalAlloc(LPTR, lpbiIn->biClrUsed); if (pi->palette_map == NULL) return ICERR_MEMORY; @@ -1679,7 +1679,7 @@ static LRESULT DecompressBegin(CodecInfo *pi, LPCBITMAPINFOHEADER lpbiIn, break; case 15: case 16: - pi->palette_map = (LPBYTE)LocalAlloc(LPTR, lpbiIn->biClrUsed * 2); + pi->palette_map = LocalAlloc(LPTR, lpbiIn->biClrUsed * 2); if (pi->palette_map == NULL) return ICERR_MEMORY; @@ -1699,7 +1699,7 @@ static LRESULT DecompressBegin(CodecInfo *pi, LPCBITMAPINFOHEADER lpbiIn, break; case 24: case 32: - pi->palette_map = (LPBYTE)LocalAlloc(LPTR, lpbiIn->biClrUsed * sizeof(RGBQUAD)); + pi->palette_map = LocalAlloc(LPTR, lpbiIn->biClrUsed * sizeof(RGBQUAD)); if (pi->palette_map == NULL) return ICERR_MEMORY; memcpy(pi->palette_map, rgbIn, lpbiIn->biClrUsed * sizeof(RGBQUAD)); @@ -1753,7 +1753,7 @@ static LRESULT DecompressEnd(CodecInfo *pi) pi->bDecompress = FALSE; if (pi->palette_map != NULL) { - LocalFree((HLOCAL)pi->palette_map); + LocalFree(pi->palette_map); pi->palette_map = NULL; }
1
0
0
0
Michael Stefaniuc : msvcrt: Use NULL instead of casting zero.
by Alexandre Julliard
05 Dec '08
05 Dec '08
Module: wine Branch: master Commit: 276b938e1dc12985ec736846a1a49bdd5df9a266 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=276b938e1dc12985ec736846a…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Fri Dec 5 07:47:01 2008 +0100 msvcrt: Use NULL instead of casting zero. --- dlls/msvcrt/tests/scanf.c | 2 +- dlls/msvcrt/time.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/tests/scanf.c b/dlls/msvcrt/tests/scanf.c index b152eac..cb005f9 100644 --- a/dlls/msvcrt/tests/scanf.c +++ b/dlls/msvcrt/tests/scanf.c @@ -51,7 +51,7 @@ static void test_sscanf( void ) ok( ptr == (void *)0x46F172,"sscanf reads %p instead of %x\n", ptr, 0x46F172 ); ok( sscanf("0x46F173", "%p", &ptr) == 1, "sscanf failed\n" ); - ok( ptr == (void *)0,"sscanf reads %p instead of %x\n", ptr, 0 ); + ok( ptr == NULL,"sscanf reads %p instead of %x\n", ptr, 0 ); ok( sscanf("-46F174", "%p", &ptr) == 1, "sscanf failed\n" ); ok( ptr == (void *)0xFFB90E8C,"sscanf reads %p instead of %x\n", ptr, 0xFFB90E8C ); diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c index ba4e95c..b53cbcd 100644 --- a/dlls/msvcrt/time.c +++ b/dlls/msvcrt/time.c @@ -340,7 +340,7 @@ void CDECL MSVCRT__tzset(void) struct tm *tmp; long zone_january, zone_july; - t = (time((time_t *)0) / seconds_in_year) * seconds_in_year; + t = (time(NULL) / seconds_in_year) * seconds_in_year; tmp = localtime(&t); zone_january = -tmp->tm_gmtoff; t += seconds_in_year / 2;
1
0
0
0
Michael Stefaniuc : mshtml: Remove two superfluous casts.
by Alexandre Julliard
05 Dec '08
05 Dec '08
Module: wine Branch: master Commit: 27d8b7436f728ee19a570ff976e530cf34394776 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=27d8b7436f728ee19a570ff97…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Fri Dec 5 07:46:08 2008 +0100 mshtml: Remove two superfluous casts. --- dlls/mshtml/nsembed.c | 2 +- dlls/mshtml/view.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index 2cddbdf..923604d 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -94,7 +94,7 @@ static LRESULT WINAPI nsembed_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP This = *(NSContainer**)lParam; SetPropW(hwnd, wszTHIS, This); }else { - This = (NSContainer*)GetPropW(hwnd, wszTHIS); + This = GetPropW(hwnd, wszTHIS); } switch(msg) { diff --git a/dlls/mshtml/view.c b/dlls/mshtml/view.c index 6bc5e92..72a4a40 100644 --- a/dlls/mshtml/view.c +++ b/dlls/mshtml/view.c @@ -189,7 +189,7 @@ static LRESULT WINAPI serverwnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM This = *(HTMLDocument**)lParam; SetPropW(hwnd, wszTHIS, This); }else { - This = (HTMLDocument*)GetPropW(hwnd, wszTHIS); + This = GetPropW(hwnd, wszTHIS); } switch(msg) {
1
0
0
0
Michael Stefaniuc : hal: Don't cast zero.
by Alexandre Julliard
05 Dec '08
05 Dec '08
Module: wine Branch: master Commit: f142ad923add383f1cae80e96d294d3934684a47 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f142ad923add383f1cae80e96…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Fri Dec 5 07:45:49 2008 +0100 hal: Don't cast zero. --- dlls/hal/hal.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/hal/hal.c b/dlls/hal/hal.c index 0b64809..6390edf 100644 --- a/dlls/hal/hal.c +++ b/dlls/hal/hal.c @@ -62,7 +62,7 @@ KIRQL WINAPI KfAcquireSpinLock(PKSPIN_LOCK SpinLock) { FIXME( "(%p) stub!\n", SpinLock ); - return (KIRQL)0; + return 0; } @@ -86,7 +86,7 @@ KIRQL WINAPI KfRaiseIrql(KIRQL NewIrql) { FIXME( "(%u) stub!\n", NewIrql ); - return (KIRQL)0; + return 0; }
1
0
0
0
Alexandre Julliard : fnt2bdf: Get rid of useless string constants.
by Alexandre Julliard
05 Dec '08
05 Dec '08
Module: wine Branch: master Commit: a5f1e9b62ccbe82646bf50bc95f4808412109939 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a5f1e9b62ccbe82646bf50bc9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 5 12:36:05 2008 +0100 fnt2bdf: Get rid of useless string constants. --- tools/fnt2bdf.c | 44 ++++++++++++++++++-------------------------- 1 files changed, 18 insertions(+), 26 deletions(-) diff --git a/tools/fnt2bdf.c b/tools/fnt2bdf.c index 1a14d6c..f204720 100644 --- a/tools/fnt2bdf.c +++ b/tools/fnt2bdf.c @@ -47,21 +47,13 @@ /* global options */ -int dump_bdf( fnt_fontS* cpe_font_struct, unsigned char* file_buffer); -int dump_bdf_hdr(FILE* fs, fnt_fontS* cpe_font_struct, unsigned char* file_buffer); - -char* g_lpstrFileName = NULL; -char* g_lpstrCharSet = NULL; -char* g_lpstrInputFile = NULL; -int g_outputPoints = 0; - -static const char* errorDLLRead = "Unable to read Windows DLL.\n"; -static const char* errorFNTRead = "Unable to read .FNT file.\n"; -static const char* errorOpenFile = "Unable to open file.\n"; -static const char* errorMemory = "Memory allocation error.\n"; -static const char* errorFile = "Corrupt or invalid file.\n"; -static const char* errorFontData = "Unable to parse font data: Error "; -static const char* errorEmpty = "No fonts found.\n"; +static int dump_bdf( fnt_fontS* cpe_font_struct, unsigned char* file_buffer); +static int dump_bdf_hdr(FILE* fs, fnt_fontS* cpe_font_struct, unsigned char* file_buffer); + +static char* g_lpstrFileName = NULL; +static char* g_lpstrCharSet = NULL; +static char* g_lpstrInputFile = NULL; +static int g_outputPoints = 0; /* info */ @@ -202,7 +194,7 @@ static int parse_fnt_data(unsigned char* file_buffer, int length) return t; } -int dump_bdf( fnt_fontS* cpe_font_struct, unsigned char* file_buffer) +static int dump_bdf( fnt_fontS* cpe_font_struct, unsigned char* file_buffer) { FILE* fp; int ic; @@ -311,7 +303,7 @@ return 0; } -int dump_bdf_hdr(FILE* fs, fnt_fontS* cpe_font_struct, unsigned char* file_buffer) +static int dump_bdf_hdr(FILE* fs, fnt_fontS* cpe_font_struct, unsigned char* file_buffer) { int l_fchar = return_data_value(dfChar, &cpe_font_struct->hdr.fi.dfFirstChar), l_lchar = return_data_value(dfChar, &cpe_font_struct->hdr.fi.dfLastChar); @@ -595,20 +587,20 @@ int main(int argc, char **argv) if( !(lpfont = (unsigned char*) realloc( lpfont, length )) ) { - fprintf(stderr, errorMemory ); + fprintf(stderr, "Memory allocation error.\n" ); exit(1); } lseek( fd, offset, SEEK_SET ); if( read(fd, lpfont, length) != length ) { - fprintf(stderr, errorDLLRead ); + fprintf(stderr, "Unable to read Windows DLL.\n" ); exit(1); } if( (i = parse_fnt_data( lpfont, length )) ) { - fprintf(stderr, "%s%d\n", errorFontData, i ); + fprintf(stderr, "Unable to parse font data: Error %d\n", i ); exit(1); } } @@ -617,14 +609,14 @@ int main(int argc, char **argv) } else { - fprintf(stderr, errorEmpty ); + fprintf(stderr, "No fonts found.\n" ); exit(1); } free( lpdata ); } else { - fprintf(stderr, errorDLLRead); + fprintf(stderr, "Unable to read Windows DLL.\n" ); exit(1); } break; @@ -634,20 +626,20 @@ int main(int argc, char **argv) { if( (i = parse_fnt_data( lpdata, file_stat.st_size )) ) { - fprintf(stderr, "%s%d\n", errorFontData, i ); + fprintf(stderr, "Unable to parse font data: Error %d\n", i ); exit(1); } free( lpdata ); } else { - fprintf(stderr, errorFNTRead); + fprintf(stderr, "Unable to read .FNT file.\n" ); exit(1); } break; case FILE_ERROR: - fprintf(stderr, errorFile ); + fprintf(stderr, "Corrupt or invalid file.\n" ); exit(1); } close(fd); @@ -655,7 +647,7 @@ int main(int argc, char **argv) } else { - fprintf(stderr, errorOpenFile ); + fprintf(stderr, "Unable to open '%s'.\n", g_lpstrInputFile ); exit(1); } }
1
0
0
0
Vincent Povirk : server: Fix string format warning.
by Alexandre Julliard
05 Dec '08
05 Dec '08
Module: wine Branch: master Commit: 8b49ecc3d84cc7fe7b9633f5b2eb37e9a8562720 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8b49ecc3d84cc7fe7b9633f5b…
Author: Vincent Povirk <madewokherd+d41d(a)gmail.com> Date: Thu Dec 4 22:02:35 2008 -0600 server: Fix string format warning. --- server/trace.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/server/trace.c b/server/trace.c index dfbddac..edb5440 100644 --- a/server/trace.c +++ b/server/trace.c @@ -67,7 +67,7 @@ static void dump_uints( const int *ptr, int len ) static void dump_timeout( const timeout_t *time ) { - fprintf( stderr, get_timeout_str(*time) ); + fputs( get_timeout_str(*time), stderr ); } static void dump_file_pos( const file_pos_t *pos )
1
0
0
0
Vincent Povirk : widl: Fix string format warning.
by Alexandre Julliard
05 Dec '08
05 Dec '08
Module: wine Branch: master Commit: 479f5a1b217a9293528924e3f61498f6757467d0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=479f5a1b217a9293528924e3f…
Author: Vincent Povirk <madewokherd+d41d(a)gmail.com> Date: Thu Dec 4 23:25:56 2008 -0600 widl: Fix string format warning. yyerror takes a single string argument, not a format string. --- tools/widl/utils.c | 18 ++++++------------ tools/widl/utils.h | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/tools/widl/utils.c b/tools/widl/utils.c index 1730e41..2e05add 100644 --- a/tools/widl/utils.c +++ b/tools/widl/utils.c @@ -66,18 +66,6 @@ static void generic_msg(const loc_info_t *loc_info, const char *s, const char *t } -/* yyerror: yacc assumes this is not newline terminated. */ -void parser_error(const char *s, ...) -{ - loc_info_t cur_location = CURRENT_LOCATION; - va_list ap; - va_start(ap, s); - generic_msg(&cur_location, s, "Error", ap); - fprintf(stderr, "\n"); - va_end(ap); - exit(1); -} - void error_loc(const char *s, ...) { loc_info_t cur_loc = CURRENT_LOCATION; @@ -88,6 +76,12 @@ void error_loc(const char *s, ...) exit(1); } +/* yyerror: yacc assumes this is not newline terminated. */ +void parser_error(const char *s) +{ + error_loc("%s\n", s); +} + void error_loc_info(const loc_info_t *loc_info, const char *s, ...) { va_list ap; diff --git a/tools/widl/utils.h b/tools/widl/utils.h index 761d3b4..5c440be 100644 --- a/tools/widl/utils.h +++ b/tools/widl/utils.h @@ -33,7 +33,7 @@ char *xstrdup(const char *str); #define __attribute__(X) #endif -void parser_error(const char *s, ...) __attribute__((format (printf, 1, 2))) __attribute__((noreturn)); +void parser_error(const char *s) __attribute__((noreturn)); int parser_warning(const char *s, ...) __attribute__((format (printf, 1, 2))); void error_loc(const char *s, ...) __attribute__((format (printf, 1, 2))) __attribute__((noreturn)); void error(const char *s, ...) __attribute__((format (printf, 1, 2))) __attribute__((noreturn));
1
0
0
0
← Newer
1
...
96
97
98
99
100
101
102
...
123
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
Results per page:
10
25
50
100
200