Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#6898 closed defect (fixed)

swig perl non void function return garbage

Reported by: brunofriedmann Owned by: Ari Jolma
Priority: normal Milestone:
Component: PerlBindings Version: 2.2.0
Severity: normal Keywords:
Cc:

Description

Trying to update our openSUSE package to version 2.2.0 I receive a error check from our bot code checker about functions that are non void, but return undefine data.

swig/perl/gdal_wrap.cpp line 1828 AV* to_array_classifier(SV* classifier, int* comparison, const char error){}

This is also present in swig/include/perl/band.i line 89

I've created a patch (but please consider my knowledge of C and swig being very low). The software build correctly on our tools Patch attached for review.

Attachments (1)

fix-non-void-return.patch (1.5 KB ) - added by brunofriedmann 7 years ago.
Proposed patch to fix non-void function return garbage

Download all attachments as: .zip

Change History (5)

by brunofriedmann, 7 years ago

Attachment: fix-non-void-return.patch added

Proposed patch to fix non-void function return garbage

comment:1 by Ari Jolma, 7 years ago

Thanks for this. The code is indeed a bit sloppy and for new (and should be marked as experimental) methods. I'll fix these.

Last edited 7 years ago by Ari Jolma (previous) (diff)

comment:2 by Ari Jolma, 7 years ago

Resolution: fixed
Status: newclosed

In 38636:

Perl bindings: always return something from non-void functions. Fixes #6898.

comment:3 by Ari Jolma, 7 years ago

In 38637:

Perl bindings: always return something from non-void functions. Fixes #6898.

comment:4 by brunofriedmann, 7 years ago

Thanks Ari, I've picked your patches in my build now, waiting next bugfix release.

Note: See TracTickets for help on using tickets.