mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-15 05:25:53 +01:00
Compiler food.
WMMergePLDictionaries() and WMSubtractPLDictionaries() are declared to return WMPropList * but are set to call the wassertr macro when their arguments do not pass a sanity check. The wassertr macro eventually calls return with no return value, triggering a compiler warning if -Wreturn-type is used. Change wassertr to wassertrv and force a return of NULL in the error case.
This commit is contained in:
committed by
Carlos R. Mafra
parent
729886ef52
commit
25b5ca2566
@@ -1162,7 +1162,7 @@ WMPropList *WMMergePLDictionaries(WMPropList * dest, WMPropList * source, Bool r
|
|||||||
WMPropList *key, *value, *dvalue;
|
WMPropList *key, *value, *dvalue;
|
||||||
WMHashEnumerator e;
|
WMHashEnumerator e;
|
||||||
|
|
||||||
wassertr(source->type == WPLDictionary && dest->type == WPLDictionary);
|
wassertrv(source->type == WPLDictionary && dest->type == WPLDictionary, NULL);
|
||||||
|
|
||||||
if (source == dest)
|
if (source == dest)
|
||||||
return dest;
|
return dest;
|
||||||
@@ -1189,7 +1189,7 @@ WMPropList *WMSubtractPLDictionaries(WMPropList * dest, WMPropList * source, Boo
|
|||||||
WMPropList *key, *value, *dvalue;
|
WMPropList *key, *value, *dvalue;
|
||||||
WMHashEnumerator e;
|
WMHashEnumerator e;
|
||||||
|
|
||||||
wassertr(source->type == WPLDictionary && dest->type == WPLDictionary);
|
wassertrv(source->type == WPLDictionary && dest->type == WPLDictionary, NULL);
|
||||||
|
|
||||||
if (source == dest) {
|
if (source == dest) {
|
||||||
WMPropList *keys = WMGetPLDictionaryKeys(dest);
|
WMPropList *keys = WMGetPLDictionaryKeys(dest);
|
||||||
|
|||||||
Reference in New Issue
Block a user