Hello José,
i checked your delivered code, here my intermediate report.
I used WinMerge to compare the files.
With the options "-w3 -es2" the compile
process stopped at this module, where a first warning
appears.
I realized, that this setting is best for find some
incompatibilities in the prg code (causes some crashes in sample programs ?),
like not correspending method declaration in the class
part and the implementation of the method and
not used parameters or variables (examples):
METHOD Activate CLASS xxx
must be set to
METHOD Activate() CLASS xxx
LOCAL a
a := " " <== remove this, warning about unused variable
IF condition
a := "True"
ELSE
a := "False"
ENDIF
Here variable a is forever filled with a value (means not NIL)
Problem with unused parameters:
STATIC FUNCTION FltGoTo( oBrw, nRecord )
(oBrw) <== add this, good idea
RETURNdbGoto(nRecord)
I replaced the files, but there are many other warnings to fix,
it is a lot of work to do in the complete WinApi source code (and GTK).
Also all sample programs and utils must be tested after the modifications.
The makefile.gcc contains the new options in a comment line,
ready for activate it if work is done.
With r2939 i committed your recent modifications.
I checked them with my application CLLOG:
But at this time it is not possible to compile with "-w3 -es2".
Be patient, i am very busy now and there are other items to handle, inclusive my app CLLOG.
My suggestion is, i'll do this step by step, so the ticket must be hold
open an longer period.
MNI TNX for your support,
73 es 55 de
DF7BE, Wilfried
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
(oBrw) -> perhaps not so good, HB_SYMBOL_UNUSED(x) makes the same, and may be better because call attention about the variable
But after first changes, I remember that some variables can be used on #ifdef #else #endif, and need tests on windows and linux.
I prepare on github machines with harbour 3.2, harbour 3.4 and linux, but need help on linux machine.
linux machine is here: https://github.com/JoseQuintas/hwgui/blob/main/.github/workflows/hwgui_hb34_linux.yml
hwgui compilation is made on each commit, on all machines.
Later will compile all samples too.
It is a good check, to do not forgot anything.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
some changes on hbps: using allways hwgui.hbc, setup can be made only on hbc
on hbc {!hblib} will add libraries only for exe/dll (on lib creation they do not exists)
note: each zip is one folder, windows format crlf
Note a zero-length file, is to remember to delete a duplicated file.
Hello José,
uuuh, a lot of work is done last evening.
I modified the files of WinAPI, so the standard libraries of HWGUI
can be build with "-w3 -es2".
I tested the files with my app "CLLOG" and some samples
and the hgt test sample in directory test.
Here some troubles fixed:
Warning W0001 Method <new( oparent,="" nid,="" value,="" baction,="" lonce="" )=""> not declared or declaration mismatch in class <htimer>
== > a lot of conflicts between the METHOD declaration in the CLASS group an the implementation,</htimer></new(>
\source\common\procmisc\scrdebug.prg:
STATIC FUNCTION MacroError( e )
Parameters not used
HB_SYMBOL_UNUSED(e)
BREAK
Warning W0028 Unreachable code
RETURN .T.
==> Here i commented the BREAK command out, do you have an idea
(will try with QUIT command?)
Warning W0032 Variable 'N' is assigned but not used in function ...:
IF ( n := Eval( ::bOther,Self,msg,wParam,lParam ) ) != - 1
Devide into 2 instructions:
n := Eval( ::bOther,Self,msg,wParam,lParam )
IF n != - 1
Please check the code (r2940)
I think, that with this options it is easier to find crashes i detected in the samples
and some other obscure behaviour.
For me to do this weekend (i can spend some time for this case):
Same procedure for GTK source code
Search for code blocks, found some conflicts here.
Must search for corresponding Eval() and correct the parameters (urgent)
Test with all sample program and again for "CLLOG".
After this, i will look for your hbp files you posted.
Please post me the code modification, if you find bugs bases on this big modifications
with this ticket (please also for all other users and developers).
I will check it as soon as possible.
For archive purposes (and for possible needed revert of changes)
i posted the output of "svn diff" before commit with this ticket.
yes, it is on the sources I send.
if .T.
break
endif
and the n, remove it
if Eval( ::bOther,Self,msg,wParam,lParam ) != -1
I am adjusting to -w3 -es2 too, but I began to work on one hbp at a time,, smallest first.
On this way, we can archive one lib at a time.
The last one will be the samples.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
CAUTION with changes, not sure about this: on an codeblock
hcolumn():New( "", { | v, o | ..... } )
because do not use v, you change to
hcolumn():New( "", { | o | ... } )
this block do not need v, but hColumn() may need it, and may cause wrong parameters, except if hcolumn() class was changed too and do not need first parameter.
I only see this because I change the source too, and git shows as a conflict.
procmisc/scrdebug.prg
But may be you change anothers codeblocks too in same way, and this is DANGEROUS
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello José,
good morning, i started now the corrections of the modifications i made.
At first:
1) must convert your files back to UNIX line endings
2) needed to modify in procscri.prg
ifdef WINDOWS
to
ifdef __PLATFORM__WINDOWS
And i saw this:
oBrwData:AddColumn( HColumn():New( "",{ |v, o | HB_SYMBOL_UNUSED( v ), o:aArray[ o:nCurrent, 1 ] }, "C", 30, 0 ) )
to avoid the warning in the block.
I'll revert the block commands in the code committed yesterday and add "HB_SYMBOL_UNUSED",
do it also in the GTK code, otherwise now ready for commit.
Then i start to check your other code delivered by you.
And a new ticket from Itamar i must to look for (tutorial).
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
please wait for clone to Git if a am ready with all.
Ok about this.
Now I use git svn fetch -r2900:HEAD
And apply last commits on git, before my changes.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
svn commit -m"Ticket #77: value with HB_SYMBOL_UNUSED( x ) for unused variables for GTK, see post to ticket."
Hallo José,
committed Code for GTK with r2943.
I tested with dbview.prg and winprn.prg
Please check.
I'll check your files for hwreport and hwmake until next monday or tuesday,
i am very busy now.
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Itamar,
could you do us a favour:
Please do not paste such mass of output messages into the post window,
please collect them in a file and post it as an attachment.
This blows up the web page.
Thanks.
With regards,
73 es 55 de
Wilfried, DF7BE
==== Original post ====
Hi!
Here hwgui.hbc files test ok
Hello Itamar,
this could be a problem of the newer GCC version, handling warnings much stronger.
My version is:
gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
and there are no Warnings.
I added a new include file "warnings.h" for setting PRAGMA's to
suppress warnings. This file could be extended for newer compiler versions.
Please post the versions of your OS.
If you have modifcations for this header, feel free to post them.
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello José,
here my report for
hwmake and hwreport.
I committed my intermediate state with r2944.
With MingW32 the hwmake is compilable and runs.
A long time ago, i tried to compile and run the hwreport
utility, but it fails, because it is designed for BCC.
The problem is, that the rc-file is not suitable for MinGW.
A long time ago, i extracted the icon from the hex value in the
rc file. The file "repbuild2.rc" is a trial for Ming32, but
compile with windres.exe fails for compile.
So the port for LINUX/GTK must be done later.
Please check.
hwreport.prg: No changes
opensave.prg:
Removed
define SB_VERT
propert.prg:
Removed
define UDS_SETBUDDYINT 2
define UDS_ALIGNRIGHT 4
Solved by
ifdef xx
..
endif
Compile error message follows.
With regards,
MNI TNX, 73 ed 55 de
DF7BE, Wilfried
Hello José,
your corrected common/procmisc/procscri.prg
committed.
Please check. On Windows/MinGW32 and Ubuntu 16 no problems.
Hello Itamar
the only way to avoid this mass of warnings is to
set compiler pragma's (see my post from yesterday).
This was already done with GCC 8.2 of MinGW64
so it can be realized here in the same way.
The facts is , that the recent GTK 2 implementation must be
adapted to GCC 10 (Please open a ticket at the GTK developper's group ?).
I can not retrace the warning at this moment,
because i need some time to update my Ubuntu, so
i need your help:
First copy modified file "warnings.h" from include directory of last commit r2946 into
your local copy of HWGUI.
insert the line
#include "warnings.h"
in every c-file of directory "source\gtk"
causing the warning's.
(Done for misc.c and control.c)
Post a list with the names of modified files, so that i can
synchronize and check them.
Check again, after i committed the modifications,
i'll inform you then.
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
José Quintas and I, we used the hbmk2 files to compile, as long as the files to compile hwgui.hbp and hwgui.hbc and the others are not fixed, I can't test it.
Please see -iinclude flag removed of file hwgui.hbp and others.
Best regards,
Itamar M. Lins Jr.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello José,
i checked your delivered code, here my intermediate report.
I used WinMerge to compare the files.
With the options "-w3 -es2" the compile
process stopped at this module, where a first warning
appears.
I realized, that this setting is best for find some
incompatibilities in the prg code (causes some crashes in sample programs ?),
like not correspending method declaration in the class
part and the implementation of the method and
not used parameters or variables (examples):
METHOD Activate CLASS xxx
must be set to
METHOD Activate() CLASS xxx
LOCAL a
a := " " <== remove this, warning about unused variable
IF condition
a := "True"
ELSE
a := "False"
ENDIF
Here variable a is forever filled with a value (means not NIL)
Problem with unused parameters:
STATIC FUNCTION FltGoTo( oBrw, nRecord )
(oBrw) <== add this, good idea
I replaced the files, but there are many other warnings to fix,
it is a lot of work to do in the complete WinApi source code (and GTK).
Also all sample programs and utils must be tested after the modifications.
The makefile.gcc contains the new options in a comment line,
ready for activate it if work is done.
With r2939 i committed your recent modifications.
I checked them with my application CLLOG:
But at this time it is not possible to compile with "-w3 -es2".
Be patient, i am very busy now and there are other items to handle, inclusive my app CLLOG.
My suggestion is, i'll do this step by step, so the ticket must be hold
open an longer period.
MNI TNX for your support,
73 es 55 de
DF7BE, Wilfried
(oBrw) -> perhaps not so good, HB_SYMBOL_UNUSED(x) makes the same, and may be better because call attention about the variable
But after first changes, I remember that some variables can be used on #ifdef #else #endif, and need tests on windows and linux.
I prepare on github machines with harbour 3.2, harbour 3.4 and linux, but need help on linux machine.
linux machine is here: https://github.com/JoseQuintas/hwgui/blob/main/.github/workflows/hwgui_hb34_linux.yml
hwgui compilation is made on each commit, on all machines.
Later will compile all samples too.
It is a good check, to do not forgot anything.
some changes on hbps: using allways hwgui.hbc, setup can be made only on hbc
on hbc {!hblib} will add libraries only for exe/dll (on lib creation they do not exists)
note: each zip is one folder, windows format crlf
Note a zero-length file, is to remember to delete a duplicated file.
Last edit: José M. C. Quintas 2021-02-18
more files, each zip is the file folder
adjust to compile using -w3 -es2, and format source code (not full format)
Hello José,
uuuh, a lot of work is done last evening.
I modified the files of WinAPI, so the standard libraries of HWGUI
can be build with "-w3 -es2".
I tested the files with my app "CLLOG" and some samples
and the hgt test sample in directory test.
Here some troubles fixed:
Warning W0001 Method <new( oparent,="" nid,="" value,="" baction,="" lonce="" )=""> not declared or declaration mismatch in class <htimer>
== > a lot of conflicts between the METHOD declaration in the CLASS group an the implementation,</htimer></new(>
\source\common\procmisc\scrdebug.prg:
STATIC FUNCTION MacroError( e )
HB_SYMBOL_UNUSED(e)
BREAK
RETURN .T.
==> Here i commented the BREAK command out, do you have an idea
(will try with QUIT command?)
Warning W0032 Variable 'N' is assigned but not used in function ...:
IF ( n := Eval( ::bOther,Self,msg,wParam,lParam ) ) != - 1
Devide into 2 instructions:
n := Eval( ::bOther,Self,msg,wParam,lParam )
IF n != - 1
Please check the code (r2940)
I think, that with this options it is easier to find crashes i detected in the samples
and some other obscure behaviour.
For me to do this weekend (i can spend some time for this case):
Must search for corresponding Eval() and correct the parameters (urgent)
After this, i will look for your hbp files you posted.
Please post me the code modification, if you find bugs bases on this big modifications
with this ticket (please also for all other users and developers).
I will check it as soon as possible.
For archive purposes (and for possible needed revert of changes)
i posted the output of "svn diff" before commit with this ticket.
MNI TNX for user support !
With regards,
73 es 55 de
DF7BE, Wilfried
yes, it is on the sources I send.
if .T.
break
endif
and the n, remove it
if Eval( ::bOther,Self,msg,wParam,lParam ) != -1
I am adjusting to -w3 -es2 too, but I began to work on one hbp at a time,, smallest first.
On this way, we can archive one lib at a time.
The last one will be the samples.
CAUTION with changes, not sure about this: on an codeblock
hcolumn():New( "", { | v, o | ..... } )
because do not use v, you change to
hcolumn():New( "", { | o | ... } )
this block do not need v, but hColumn() may need it, and may cause wrong parameters, except if hcolumn() class was changed too and do not need first parameter.
I only see this because I change the source too, and git shows as a conflict.
procmisc/scrdebug.prg
But may be you change anothers codeblocks too in same way, and this is DANGEROUS
Only scrdebug.prg has the mentioned situation.
I send it attached on previous zip, if you update it, all ok.
Hello José,
good morning, i started now the corrections of the modifications i made.
At first:
1) must convert your files back to UNIX line endings
2) needed to modify in procscri.prg
ifdef WINDOWS
to
ifdef __PLATFORM__WINDOWS
And i saw this:
oBrwData:AddColumn( HColumn():New( "",{ |v, o | HB_SYMBOL_UNUSED( v ), o:aArray[ o:nCurrent, 1 ] }, "C", 30, 0 ) )
to avoid the warning in the block.
I'll revert the block commands in the code committed yesterday and add "HB_SYMBOL_UNUSED",
do it also in the GTK code, otherwise now ready for commit.
Then i start to check your other code delivered by you.
And a new ticket from Itamar i must to look for (tutorial).
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hello José,
looking into the svn difflog, i
detected 3 files for WinAPI to
revert the changes of the inconsistent
blocks. Committed with r2942.
Now i continue with GTK and your other posted code.
please wait for clone to Git if a am ready with all.
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
svn commit -m"Ticket #77: value with HB_SYMBOL_UNUSED( x ) for unused variables for GTK, see post to ticket."
Hallo José,
committed Code for GTK with r2943.
I tested with dbview.prg and winprn.prg
Please check.
I'll check your files for hwreport and hwmake until next monday or tuesday,
i am very busy now.
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hi!
Now see others problems that before not exists
Best regards,
Itamar M. Lins Jr.
Last edit: Itamar M. Lins Jr. 2021-02-21
Hello Itamar,
could you do us a favour:
Please do not paste such mass of output messages into the post window,
please collect them in a file and post it as an attachment.
This blows up the web page.
Thanks.
With regards,
73 es 55 de
Wilfried, DF7BE
==== Original post ====
Hi!
Here hwgui.hbc files test ok
And hwgui.hbp file
And warnings for 64Bits on Linux GCC 10.2
~~~
==> moved to attached file "messages.txt".
Last edit: Wilfried Brunken 2021-02-21
Hi!
Probably remove inadvertently this flag "-iinclude" of files .hbp
procmisc.hbp same problem.
Best regards,
Itamar M. Lins Jr.
My error.
New hwgui.hbc
And now I can compile on github/ubuntu linux.
Last edit: José M. C. Quintas 2021-02-21
Hello Itamar,
this could be a problem of the newer GCC version, handling warnings much stronger.
My version is:
gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
and there are no Warnings.
I added a new include file "warnings.h" for setting PRAGMA's to
suppress warnings. This file could be extended for newer compiler versions.
Please post the versions of your OS.
If you have modifcations for this header, feel free to post them.
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hello José,
here my report for
hwmake and hwreport.
I committed my intermediate state with r2944.
With MingW32 the hwmake is compilable and runs.
A long time ago, i tried to compile and run the hwreport
utility, but it fails, because it is designed for BCC.
The problem is, that the rc-file is not suitable for MinGW.
A long time ago, i extracted the icon from the hex value in the
rc file. The file "repbuild2.rc" is a trial for Ming32, but
compile with windres.exe fails for compile.
So the port for LINUX/GTK must be done later.
Please check.
hwreport.prg: No changes
opensave.prg:
define SB_VERT
propert.prg:
define UDS_SETBUDDYINT 2
define UDS_ALIGNRIGHT 4
Solved by
ifdef xx
..
endif
Compile error message follows.
With regards,
MNI TNX, 73 ed 55 de
DF7BE, Wilfried
C:\hwgui\hwgui\contrib\hwreport>hbmk2 hwreport.hbp
Harbour 3.2.0dev (r2002101434)
Copyright (c) 1999-2020, https://harbour.github.io/
windres.exe: repbuild.rc:4: syntax error
repbuild.rc:2:0: fatal error: when writing output to : Broken pipe
compilation terminated.
windres.exe: preprocessing failed.
hbmk2[hwreport]: Error: Running resource compiler. 1
windres.exe -I"C:/harbour/core-master/include" -I../../include repbuild.rc -O coff -o C:/Users/AFULAP~1/AppData/Local/Temp/hbmk_2xrz1e.dir/repbuild.reso
C:\hwgui\hwgui\contrib\hwreport>hbmk2 hwreport.hbp
Harbour 3.2.0dev (r2002101434)
Copyright (c) 1999-2020, https://harbour.github.io/
windres.exe: repbuild2.rc:4: syntax error
hbmk2[hwreport]: Error: Running resource compiler. 1
windres.exe -I"C:/harbour/core-master/include" -I../../include repbuild2.rc -O coff -o C:/Users/AFULAP~1/AppData/Local/Temp/hbmk_3jo9lj.dir/repbuild2.reso
on windows, need lsetdebugger on procscri.prg
Hi!
previous attached file is about this warning on windows.
Hello José,
your corrected common/procmisc/procscri.prg
committed.
Please check. On Windows/MinGW32 and Ubuntu 16 no problems.
Hello Itamar
the only way to avoid this mass of warnings is to
set compiler pragma's (see my post from yesterday).
This was already done with GCC 8.2 of MinGW64
so it can be realized here in the same way.
The facts is , that the recent GTK 2 implementation must be
adapted to GCC 10 (Please open a ticket at the GTK developper's group ?).
I can not retrace the warning at this moment,
because i need some time to update my Ubuntu, so
i need your help:
your local copy of HWGUI.
#include "warnings.h"
in every c-file of directory "source\gtk"
causing the warning's.
(Done for misc.c and control.c)
synchronize and check them.
i'll inform you then.
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hi!
José Quintas and I, we used the hbmk2 files to compile, as long as the files to compile hwgui.hbp and hwgui.hbc and the others are not fixed, I can't test it.
Please see -iinclude flag removed of file hwgui.hbp and others.
Best regards,
Itamar M. Lins Jr.
Check my message about "my error", attached I send hwgui.hbc with changes
Hello José, Hello Itamar,
step by step:
Committed with r2947, the compile works
with the hbmk2 utility now.
Please check.
Added in some files this:
/ Avoid warnings from GCC /
include "warnings.h"
Here the output of compile run on my Ubuntu 16 system:
hbmk2 hwgui.hbp procmisc.hbp hbxml.hbp hwgdebug.hbp
Harbour 3.2.0dev (r2006301601)
Copyright (c) 1999-2020, https://harbour.github.io/
Harbour 3.2.0dev (r2006301601)
Copyright (c) 1999-2020, https://harbour.github.io/
Harbour 3.2.0dev (r2006301601)
Copyright (c) 1999-2020, https://harbour.github.io/
Harbour 3.2.0dev (r2006301601)
Copyright (c) 1999-2020, https://harbour.github.io/
Also the tutor runs:
cltest@afulinux4:~/hwgui/utils/tutorial$ hbmk2 tutor.hbp
Harbour 3.2.0dev (r2006301601)
Copyright (c) 1999-2020, https://harbour.github.io/
I hope, that's OK now.
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried