gcc -Wreturn-type errors in hplip

Bug #1836735 reported by Martin Wilck
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned

Bug Description

openSUSE compiles C code with the option "-Werror=return-type". This doesn't work with the current hplip code. The attached patch fixes the warnings.

Revision history for this message
Martin Wilck (mwilck) wrote :
Revision history for this message
zdohnal (zdohnal) wrote :

Hi Martin,

I thank you for filing the issue! I as Fedora hplip maintainer got the similar pull request which fixes the issue https://src.fedoraproject.org/rpms/hplip/pull-request/6# .
IMO your patch indeed fixes the issue, but it slows the code execution a little bit - influencing the performance. The execution goes through all if statements with your patch instead of returning after the first matched 'if' condition (as the old code did).

I'm attaching our Fedora patch.

Revision history for this message
Martin Wilck (mwilck) wrote :

Thanks, zdohnal.

Have you seen a measurable/user-noticeable performance difference (I wouldn't expect it).
If not, I'll stick with our patch for the time being. I've tried to keep my patch small.

Once upstream does anything about it (HELLO, upstream - is anyone listening?), we'll resort to whatever they choose.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.