include warn_unused_result in ALLOC

pull/1347/head
nick black 3 years ago committed by Nick Black
parent 1b61786694
commit 602531ff33

@ -33,7 +33,7 @@ extern "C" {
#endif
#define API __attribute__((visibility("default")))
#define ALLOC __attribute__((malloc))
#define ALLOC __attribute__((malloc)) __attribute__((warn_unused_result))
// Get a human-readable string describing the running Notcurses version.
API const char* notcurses_version(void);

@ -126,7 +126,9 @@ int runreels(struct notcurses* nc, struct ncreel* nr){
return 0;
case 'a':{
auto tctx = new TabletCtx();
ncreel_add(nr, nullptr, nullptr, tabletfxn, tctx);
if(!ncreel_add(nr, nullptr, nullptr, tabletfxn, tctx)){
return -1;
}
break;
}
case 'd':

Loading…
Cancel
Save