OpenSolaris

Printable Version Enter a New Search
Bug ID 6812706
Synopsis lint warning for hpet_stop_main_counter return value always ignored
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:sched
Keywords
Responsible Engineer Bill Holler
Reported Against snv_110
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_111
Fixed In snv_111
Release Fixed solaris_nevada(snv_111) , solaris_10u8(s10u8_02) (Bug ID:2175194)
Related Bugs 6700904
Submit Date 4-March-2009
Last Update Date 25-March-2009
Description
Sherry Moore saw this lint error:

>> ==== lint warnings src ====
>>
>> "/export/sherrym/hg-panic-fastboot/usr/src/uts/i86pc/io/hpet_acpi.c", line 238: warning: function returns value which is always ignored: hpet_stop_main_counter (E_FUNC_RET_ALWAYS_IGNOR2)
>>
>> ==== lint noise differences src ====
>>
>> 0a1,2
>>   
>>> "/export/sherrym/hg-panic-fastboot/usr/src/uts/i86pc/io/hpet_acpi.c", line 238: warning: function returns value which is always ignored: hpet_stop_main_counter (E_FUNC_RET_ALWAYS_IGNOR2)


This is a real bug.

None of us on the PAD/C-state projects saw this lint failure.
Perhaps more strict-checking lint flags are needed to reproduct this?

---------------------------------------------------------------------------
Suggested Fix:

diff -r 595842f9d1e3 -r 7a6227c56f2a usr/src/uts/i86pc/io/hpet_acpi.c
--- a/usr/src/uts/i86pc/io/hpet_acpi.c  Mon Mar 02 22:26:31 2009 +0100
+++ b/usr/src/uts/i86pc/io/hpet_acpi.c  Tue Mar 03 16:45:52 2009 -0800
@@ -235,7 +235,7 @@
        if (hpet.supported == HPET_NO_SUPPORT)
                return;
        if (hpet.supported >= HPET_TIMER_SUPPORT)
-               hpet_stop_main_counter(&hpet_info);
+               (void) hpet_stop_main_counter(&hpet_info);
        if (hpet.supported > HPET_TIMER_SUPPORT)
                hpet_disable_timer(&hpet_info, hpet_info.cstate_timer.timer);
 }
Work Around
Failure is in lint warnings during build.
Comments
N/A