Page 1 of 1

Compiler warnings

Posted: Fri Nov 11, 2016 10:15 pm
by KDJ
If you compile a program with the parameter "-w3", the compiler generates such warnings:
"Ambiguous reference, assuming memvar '_HMG_SYSDATA'"
"Ambiguous reference, assuming memvar '_HMG_DEFAULTICONNAME'"

To avoid these warnings, could you add in the file "hmg.ch" a declaration of all public variables used in HMG:

Code: Select all

MEMVAR _HMG_SYSDATA
MEMVAR _HMG_DEFAULTICONNAME
MEMVAR ...

Re: Compiler warnings

Posted: Sun Apr 09, 2017 8:56 am
by Pablo C├ęsar
I think it's a good idea, I believe that should be the way.

I also do not know if this measure would accuse duplicity of statement or something...
and then demand a lot of work to fix (it would be a nightmare) :?

But anyway, if you're not totally sure as I see it, someday it should be fixed.

Re: Compiler warnings

Posted: Sun Apr 09, 2017 11:05 am
by Rathinagiri
Thank you. Let me try.

Re: Compiler warnings

Posted: Sun Apr 09, 2017 2:38 pm
by apais
Another way would be to replace EVERY instance of _HMG_SYSDATA in source code with m->_HMG_SYSDATA
It's explicit and much xbase way.

HTH
Angel