dankamongmen / notcurses

blingful character graphics/TUI library. definitely not curses.
https://nick-black.com/dankwiki/index.php/Notcurses
Other
3.43k stars 113 forks source link

Completion of error handling #2691

Closed elfring closed 1 year ago

elfring commented 1 year ago

Would you like to add more error handling for return values from functions like the following?

dankamongmen commented 1 year ago

sacre bleu! unchecked malloc()s! [stabs self through stomach in shame]

dankamongmen commented 1 year ago

thank you very much for bringing this to my attention, kind @elfring ! if you want to put up a PR, i'll cheerfully merge it. otherwise, i can likely get to this tomorrow (saturday 2022-12-16).

elfring commented 1 year ago

How do you think about to improve static source code analysis also for this software? :thinking:

dankamongmen commented 1 year ago

How do you think about to improve static source code analysis also for this software? thinking

i run clang-tidy on it from time to time, or did when i was more deeply embroiled in notcurses stuff anyway. there's actually an item on the release checklist for it. other than that, i used some static analyzers (asan and friends).

there's actually an open (iirc) bug on two clang-tidy results that i suspect to be false positives, but have not yet determined as such with confidence.

elfring commented 1 year ago

:thought_balloon: Some development tools can help more according to the questionable software situation.

dankamongmen commented 1 year ago

fwiw i'm not too worried about the printf() in defaultout(), especially as that's just POC code (src/poc/ncwidth.c) unless i'm missing something.

dankamongmen commented 1 year ago

fwiw i'm not too worried about the printf() in defaultout(), especially as that's just POC code (src/poc/ncwidth.c) unless i'm missing something.

ehhh, i'll fix it anyway.

dankamongmen commented 1 year ago

ok both ought be handled. if you have a suggestion for static analysis, open a bug on it (ideally with a PR =]). thanks a lot for this report!

elfring commented 1 year ago

Further update candidates were left over.

:crystal_ball: How will chances evolve to benefit any more also from the means of aspect-oriented software development?