diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h index 3f55f7f64..ae6fffb61 100644 --- a/include/notcurses/notcurses.h +++ b/include/notcurses/notcurses.h @@ -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); diff --git a/src/pocpp/reel.cpp b/src/pocpp/reel.cpp index c314ed543..ef3323054 100644 --- a/src/pocpp/reel.cpp +++ b/src/pocpp/reel.cpp @@ -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':