Completion of error handling #150

Closed
elfring opened this Issue Mar 6, 2015 · 8 comments

Projects

None yet

3 participants

@elfring
Contributor
elfring commented Mar 6, 2015

I have looked at a few source files for your current software. I have noticed that some checks for return codes are missing.

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

@bagder bagder added a commit that referenced this issue Mar 6, 2015
@bagder bagder metalink: add some error checks
malloc() and strdup() calls without checking return codes.

Reported-by: Markus Elfring
Bug: #150
3ac3331
@bagder bagder self-assigned this Mar 6, 2015
@bagder
Member
bagder commented Mar 6, 2015

vms_realwfilesize() doesn't have any fseek calls. I assume you mean the ones in operate_do(). I consider them mostly harmless. The same goes for the parse_cert_parameter strdups.

The metalink function was improved slightly in commit 3ac3331.

@elfring
Contributor
elfring commented Mar 6, 2015

I suggest to avoid ignorance of return values a bit more.

Are you interested to apply aspect-oriented software development?
How do you think about to encapsulate error detection and corresponding exception handling as a reusable aspect in your software?

@bagder
Member
bagder commented Mar 6, 2015

Can you identify any actual problems or bugs due to your discoveries? Can you submit a patch with your suggested fixes?

@elfring
Contributor
elfring commented Mar 6, 2015

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

Do you find information sources like the following useful?

@bagder
Member
bagder commented Mar 6, 2015

Does that mean you can't identify a problem or provide a patch?

@evert
evert commented Mar 6, 2015

No, he wants to have a long-winded argument about software architecture!

@elfring
Contributor
elfring commented Mar 6, 2015

The suggested tools can help to transform source code in various ways.
Which transformations are acceptable for you to be performed by another software tool automatically?

@bagder
Member
bagder commented Mar 6, 2015

No bug then. Closed.

@bagder bagder closed this Mar 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment