Skip to content

Commit 104b732

Browse files
committed
change $isave() and $iresult to not issue warning
1 parent e8c9b36 commit 104b732

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/fu_util/fo_obj.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ fobj_klass(fobjErr);
598598
*/
599599
extern err_i fobj_err_combine(err_i first, err_i second);
600600

601-
#define fobj_reset_err(err) do { ft_dbg_assert(err); *err = (err_i){NULL}; } while(0)
601+
#define fobj_reset_err(err) do { ft_dbg_assert(err != NULL); *err = (err_i){NULL}; } while(0)
602602

603603
#include "./impl/fo_impl2.h"
604604

src/fu_util/impl/fo_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,8 @@ extern void fobj__validate_args(fobj_method_handle_t meth, fobj_t self,
543543
#endif
544544
#define fobj__idel(iface) fobj_del((void*)&(iface)->self)
545545

546-
#define fobj__isave(iface) ((__typeof(iface)){.self = $save((iface).self)})
547-
#define fobj__iresult(iface) ((__typeof(iface)){.self = $result((iface).self)})
546+
#define fobj__isave(iface) ({__typeof(iface) t=(iface); $save(t.self); t;})
547+
#define fobj__iresult(iface) ({__typeof(iface) t=(iface); $result(t.self); t;})
548548
#define fobj__ireturn(iface) return $iresult(iface)
549549

550550
/* Autorelease pool handling */

0 commit comments

Comments
 (0)