When warnings level is set to high, both C++ Builder and Visual C++ compile OWLNext with a lot of warnings.
We should clean as much as possible of these, as they can have adverse effect on compilation speed in user code that includes a lot of OWLNext headers.
Also reducing the number of warnings in OWLNext headers will make it easier to catch issues pointed by warnings in user code.
See discussion https://sourceforge.net/p/owlnext/discussion/97175/thread/e62de7e00c/
Discussion: Warnings slowing down compilation
Discussion: Warnings slowing down compilation
Discussion: Preparing updates for OWLNext 7.0, 6.44 and 6.36
Discussion: Preparing updates for OWLNext 7.0, 6.44 and 6.36
Feature Requests: #248
Wiki: OWLNext_Stable_Releases
Anonymous
Enabling warnings pointed to a small bug in TMenuGuard::RelinquishOwnership returning wrong value.
Fixed in trunk: [r6994].
Merged in 7.0 branch: [r7001].
Related
Commit: [r6994]
Commit: [r7001]
Last edit: Ognyan Chernokozhev 2024-06-19
Eliminated a number of Level 4 warnings reported by Visual C++.
trunk: [r6995].
7.0: [r7002], fixed some regressions in [r7003].
Related
Commit: [r6995]
Commit: [r7002]
Commit: [r7003]
Last edit: Ognyan Chernokozhev 2024-06-19
Replaced usages of NULL with nullptr.
trunk: [r6996].
7.0: [r7004].
Related
Commit: [r6996]
Commit: [r7004]
Last edit: Ognyan Chernokozhev 2024-06-19
Eliminated warnings reported by C++Builder about using 0 instead of nullptr.
trunk: [r6997].
7.0: [r7005].
Related
Commit: [r6997]
Commit: [r7005]
Last edit: Ognyan Chernokozhev 2024-06-19
Fixed some "old C-style cast" warnings reported by C++ Builder.
trunk: [r7006], [r7009], [r7011], [r7012].
7.0: [r7013], [r7014], [r7015], [r7016]. Fixed post-merge errors in [r7015].
Related
Commit: [r7006]
Commit: [r7009]
Commit: [r7011]
Commit: [r7012]
Commit: [r7013]
Commit: [r7014]
Commit: [r7015]
Commit: [r7016]
Last edit: Ognyan Chernokozhev 2024-06-19
Eliminated many "0 as nullptr" warnings.
trunk: [r7019].
7.0: [r7020].
Related
Commit: [r7019]
Commit: [r7020]
Last edit: Ognyan Chernokozhev 2024-06-19
Fixed an 'unused parameter' warning in dc.h.
trunk: [r7021].
Note: New code that is not present in 7.0.
Related
Commit: [r7021]
Last edit: Ognyan Chernokozhev 2024-06-19
Fixed an 'unused parameter' warning in dispatch.h.
trunk: [r7022].
7.0: [r7023].
Related
Commit: [r7022]
Commit: [r7023]
Last edit: Ognyan Chernokozhev 2024-06-19
Removed the
__OWL_OWLDEFS_H
macro.This macro according to a comment was only for VbxGen compatibility, and this is a tool no longer used.
trunk: [r7024].
7.0: [r7025].
Related
Commit: [r7024]
Commit: [r7025]
Last edit: Ognyan Chernokozhev 2024-06-19
Added macros for disabling compiler warnings.
trunk: [r7026], [r7038], [r7049].
7.0: [r7037], [r7039], [r7050].
Related
Commit: [r7026]
Commit: [r7037]
Commit: [r7038]
Commit: [r7039]
Commit: [r7049]
Commit: [r7050]
Last edit: Ognyan Chernokozhev 2024-06-19
Disabled "extension" warnings in number.h.
trunk: [r7027].
7.0: [r7033].
Related
Commit: [r7027]
Commit: [r7033]
Last edit: Ognyan Chernokozhev 2024-06-19
Removed obsolete unused macros.
_DOCVIEWCLASS
and_DOCVIEWENTRY
are no longer used._DOCVIEWCLASS
was used in OWL5 for TOleLinkView, but that class has been moved to OCFNext._DOCVIEWENTRY
was used for TDocTemplateT only in 16-bit builds which are no longer supported.trunk: [r7028].
7.0: [r7034].
Related
Commit: [r7028]
Commit: [r7034]
Last edit: Ognyan Chernokozhev 2024-06-19
Removed unused obsolete macro
_RTTI
.It may have been needed for old non-standard-compliant compilers like BC++ 5.02.
trunk: [r7029].
Note: Used in some more places in 7.0, will require separate code change to remove.
Related
Commit: [r7029]
Last edit: Ognyan Chernokozhev 2024-06-19
Removed extra semicolons.
trunk: [r7030].
Note: Some of the places are in new code in trunk, may require separate code change to resolve in 7.0.
Related
Commit: [r7030]
Last edit: Ognyan Chernokozhev 2024-06-19
Eliminated 'macro not defined, evaluates to 0' warnings.
trunk: [r7031].
7.0: [r7035].
Related
Commit: [r7031]
Commit: [r7035]
Last edit: Ognyan Chernokozhev 2024-06-19
Added override to destructors.
trunk: [r7032].
7.0: [r7036].
Related
Commit: [r7032]
Commit: [r7036]
Last edit: Ognyan Chernokozhev 2024-06-19
Removed obsolete check for checks.h.
Another legacy of BC++ 5.02 where there was a separate non-OWL header checks.h.
trunk: [r7040].
7.0: [r7044].
Related
Commit: [r7040]
Commit: [r7044]
Last edit: Ognyan Chernokozhev 2024-06-19
Renamed the sentry macro for picker.h.
trunk: [r7041].
7.0: [r7045].
Related
Commit: [r7041]
Commit: [r7045]
Last edit: Ognyan Chernokozhev 2024-06-19
Suppressed "zero is a null pointer constant" warnings in window.h and dispatch.h.
The warnings were given for the usage of HWND_DESKTOP and HANDLE_WM_NCACTIVATE, which are defined in SDK headers and cannot be changed.
trunk: [r7042].
7.0: [r7046].
Related
Commit: [r7042]
Commit: [r7046]
Last edit: Ognyan Chernokozhev 2024-06-19
Fixed some "zero is a null pointer constant" warnings.
trunk: [r7043].
7.0: [r7047].
Related
Commit: [r7043]
Commit: [r7047]
Last edit: Ognyan Chernokozhev 2024-06-19
Eliminated some "'const' type qualifier on return type has no effect" warnings. See [feature-requests:#248].
trunk: [r7051].
7.0: [r7052].
Related
Commit: [r7051]
Commit: [r7052]
Feature Requests:
#248A number of member methods of TSysLink are defined like this:
This looks like a mistake - shouldn't it be
Fixed in trunk in [r7053].
Note: the change may be binary incompatible, so for the moment will not be merged into the 7.0 branch.
Related
Commit: [r7053]
@jogybl wrote:
Yes, this is a bug of mine. Cool that your work on eliminating warnings identified it. I should have turned on all warnings when writing that class.
Good work!
Some methods in TFile and TTextFile are defined like this:
The const modifier of the parameter makes no sense - we should remove it.
Since the method is virtual, there is a small chance it may break user code if it is deriving from either class and overriding these methods.
The change should be made only in trunk, as it can also break binary compatibility of the dlls.
Eliminated some old-style C cast warnings.
trunk: [r7054].
7.0: [r7055].
Related
Commit: [r7054]
Commit: [r7055]