Menu

#275 Completion of error handling

2.0
open
nobody
None
2022-12-14
2022-12-14
No

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

Discussion

  • Git Lost

    Git Lost - 2022-12-14

    Hi Markus, any improvements most welcome! Thanks Martin

     
  • Git Lost

    Git Lost - 2022-12-14
     
  • Git Lost

    Git Lost - 2022-12-14

    Hi, just to be more clear, yes, the return values of the instances you highlight should be checked, it's an oversight that they're not, so a Merge Request would be most welcome, if that's what you're offering. Otherwise I'll put them on my to-do list, thanks!

     
    • Markus Elfring

      Markus Elfring - 2022-12-14

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

       
      • Git Lost

        Git Lost - 2022-12-14

        I'd be all for that. I do run clang-tidy locally on "backend/*.c" pretty regularly:

        clang-tidy-16 backend/*.c '-checks=-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,-clang-analyzer-security.insecureAPI.strcpy' '-header-filter=.*'
        

        which passes with 3 lines marked as NOLINT. However any further suggestions or tools and/or integrating such checks into the make process would be very useful.

         
        • Markus Elfring

          Markus Elfring - 2022-12-14

          I am trying to increase the development attention also for tools like the following.

           
          • Git Lost

            Git Lost - 2022-12-14

            Thanks. cppcheck has been drawn to my attention before (see ticket https://sourceforge.net/p/zint/tickets/233/) but I haven't run it since then (it is/was rather slow and CPU-intensive). The others weren't on my radar. Will check them out and give them a spin.

             

Log in to post a comment.