HMG 3.5 Warnings

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

HMG 3.5 Warnings

Post by AUGE_OHR »

hi,

i have installed HMG 3.5 from here
app.php/download

when build Unicode LIBs i got this "Warnings"
Lines 24125, Functions/Procedures 70
Generating C source output to 'C:\Users\a\AppData\Local\Temp\hbmk_q8iys8.dir\h_windows.c'... Done.
../../../../../../HMG35/source/BosTaurus/c_BosTaurus.c: In function 'bt_Load_GDIplus':
../../../../../../HMG35/source/BosTaurus/c_BosTaurus.c:501:34: warning: cast between incompatible function types from 'FARPROC' to 'void (__attribute__((stdcall)) *)(ULONG_PTR)' [-Wcast-function-type]
501 | GdiPlusShutdown = (Func_GdiPlusShutdown) GetProcAddress (GdiPlusHandle, "GdiplusShutdown");
| ^
../../../../../../HMG35/source/c_richeditbox.c: In function 'HB_FUN_RICHEDITBOX_GETPARAFORMAT':
../../../../../../HMG35/source/c_richeditbox.c:833:12: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
833 | else if ( ParaFormat2.wAlignment == PFA_JUSTIFY )
| ^~
../../../../../../HMG35/source/c_richeditbox.c:836:11: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
836 | hb_stornl ((LONG) Alignment, 2);
| ^~~~~~~~~
In file included from ../../../../../../HMG35/source/c_winapimisc.c:65:
../../../../../../HMG35/source/c_winapimisc.c: In function 'win_ImageDirectoryEntryToData':
c:\hmg35\include\hmg_unicode.h:234:15: warning: cast between incompatible function types from 'FARPROC' to 'void * (__attribute__((stdcall)) *)(void *, BOOLEAN, USHORT, ULONG *)' [-Wcast-function-type]
234 | pfunc = (PFUNC) GetProcAddress (hLib, _DLL_FUNC_NAMESTRINGAW);\
| ^
../../../../../../HMG35/source/c_winapimisc.c:1469:1: note: in expansion of macro 'HMG_DEFINE_DLL_FUNC'
1469 | HMG_DEFINE_DLL_FUNC ( win_ImageDirectoryEntryToData, // user function name
| ^~~~~~~~~~~~~~~~~~~
../../../../../../HMG35/source/c_winapimisc.c: In function 'win_ImageRvaToVa':
c:\hmg35\include\hmg_unicode.h:234:15: warning: cast between incompatible function types from 'FARPROC' to 'void * (__attribute__((stdcall)) *)(struct _IMAGE_NT_HEADERS *, void *, ULONG, struct _IMAGE_SECTION_HEADER **)' [-Wcast-function-type]
234 | pfunc = (PFUNC) GetProcAddress (hLib, _DLL_FUNC_NAMESTRINGAW);\
| ^
../../../../../../HMG35/source/c_winapimisc.c:1479:1: note: in expansion of macro 'HMG_DEFINE_DLL_FUNC'
1479 | HMG_DEFINE_DLL_FUNC ( win_ImageRvaToVa, // user function name
| ^~~~~~~~~~~~~~~~~~~

Compiling 'RichEditBoxEx_H.prg'...
Lines 18324, Functions/Procedures 15
Generating C source output to 'C:\Users\a\AppData\Local\Temp\hbmk_nvqv4u.dir\RichEditBoxEx_H.c'... Done.
../../../../../../HMG35/hfcl/Source/c_qhtm.c: In function 'HB_FUN_QHTM_PRINTDESTROYCONTEXT':
../../../../../../HMG35/hfcl/Source/c_qhtm.c:539:42: warning: cast between incompatible function types from 'FARPROC' to 'void (__attribute__((stdcall)) *)(QHTMCONTEXT)' [-Wcast-function-type]
539 | QHTM_PRINTDESTROYCONTEXT pFunc = ( QHTM_PRINTDESTROYCONTEXT ) GetProcAddress( hQhtmDll, "QHTM_PrintDestr
oyContext" );
| ^
what do i need to correct Source and get rid of Warnings :?: ( never had in 3.4.4 )
have fun
Jimmy
User avatar
srvet_claudio
Posts: 2220
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HMG 3.5 Warnings

Post by srvet_claudio »

Hi,
it looks like the new version of gcc fails to handle normal GetProcAddress() usage on Windows, and issues a wrong warning on casts between function types it thinks are not compatible.
it's a inofensive warning.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
Post Reply