Bug 515749

Summary: Remove warnings from kvm compilation
Product: Red Hat Enterprise Linux 5 Reporter: Juan Quintela <quintela>
Component: kvmAssignee: Juan Quintela <quintela>
Status: CLOSED ERRATA QA Contact: Lawrence Lim <llim>
Severity: medium Docs Contact:
Priority: low    
Version: 5.5CC: ehabkost, lihuang, riek, tburke, tools-bugs, virt-maint, ykaul
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kvm-83-125.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-30 07:57:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Use quiet command to have a cleaner command line
none
Remove unused function
none
Remove unused variable
none
Right argument number
none
Use right type uint8_t isntead of char
none
Use C99 function declaration, not K&R
none
Add missing static modifiers
none
Use only one declaration by extern variable
none
Don't redeclare external variable kvm_allowed
none
Put prototype in header
none
Mark another variable static
none
mp_state is uint32_t
none
More static functions
none
Use uint32_t instead of int
none
Use right type
none
Don't use reason parameter, that don't exist in our version
none
Remove unused variable
none
Another missing prototype
none
var used as uint32_t should be declared as that
none
Remove duplicated declaration
none
Remove unused variable
none
Make local variable static
none
Remove duplicated declaration
none
Initialize variable to make gcc happy
none
Use right modifier for time_t
none
Remove unused variable
none
Reset handlers have a different type
none
Right type nb_sectors
none
Initialize variable to make gcc happy
none
If you change variable types, you also have to change printf
none
Make local variable static
none
Remove unused variable
none
perror is defined in <stdio.h>
none
Remove duplicated declaration
none
Remove duplicated declaration
none
Add cast to silence warning
none
Compile qemu with -Werror
none
Move several variables after .h that declares them as extern none

Description Juan Quintela 2009-08-05 15:34:53 UTC
Description of problem:

kvm compilation is too verbose at the moment.  And it introduces lots of warnings.
That makes seeing new warnings when testing/compiling bugs very difficult.  In code inspection for 5.4, I found that one of the warnings was critical and another 3 not very good.  The rest were false positives.

This set of patches fixes all the remaining warnings, and make code inspection/bug fixing/introducing new features easier.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Juan Quintela 2009-08-05 15:50:40 UTC
Created attachment 356335 [details]
Use quiet command to have a cleaner command line

Comment 2 Juan Quintela 2009-08-05 15:51:11 UTC
Created attachment 356336 [details]
Remove unused function

Comment 3 Juan Quintela 2009-08-05 15:51:45 UTC
Created attachment 356337 [details]
Remove unused variable

Comment 4 Juan Quintela 2009-08-05 15:52:52 UTC
Created attachment 356338 [details]
Right argument number

Comment 5 Juan Quintela 2009-08-05 15:53:44 UTC
Created attachment 356339 [details]
Use right type uint8_t isntead of char

Comment 6 Juan Quintela 2009-08-05 15:54:26 UTC
Created attachment 356340 [details]
Use C99 function declaration, not K&R

Comment 7 Juan Quintela 2009-08-05 15:57:06 UTC
Created attachment 356343 [details]
Add missing static modifiers

Comment 8 Juan Quintela 2009-08-05 15:57:54 UTC
Created attachment 356345 [details]
Use only one declaration by extern variable

Comment 9 Juan Quintela 2009-08-05 15:58:59 UTC
Created attachment 356347 [details]
Don't redeclare external variable kvm_allowed

Comment 10 Juan Quintela 2009-08-05 16:01:42 UTC
Created attachment 356348 [details]
Put prototype in header

Comment 11 Juan Quintela 2009-08-05 16:02:26 UTC
Created attachment 356349 [details]
Mark another variable static

Comment 12 Juan Quintela 2009-08-05 16:03:17 UTC
Created attachment 356350 [details]
mp_state is uint32_t

Comment 13 Juan Quintela 2009-08-05 16:03:54 UTC
Created attachment 356351 [details]
More static functions

Comment 14 Juan Quintela 2009-08-05 16:05:28 UTC
Created attachment 356352 [details]
Use uint32_t instead of int

Comment 15 Juan Quintela 2009-08-05 16:05:57 UTC
Created attachment 356353 [details]
Use right type

Comment 16 Juan Quintela 2009-08-05 16:06:48 UTC
Created attachment 356354 [details]
Don't use reason parameter, that don't exist in our version

Comment 17 Juan Quintela 2009-08-05 16:07:32 UTC
Created attachment 356355 [details]
Remove unused variable

Comment 18 Juan Quintela 2009-08-05 16:08:16 UTC
Created attachment 356356 [details]
Another missing prototype

Comment 19 Juan Quintela 2009-08-05 16:08:57 UTC
Created attachment 356357 [details]
var used as uint32_t should be declared as that

Comment 20 Juan Quintela 2009-08-05 16:09:34 UTC
Created attachment 356358 [details]
Remove duplicated declaration

Comment 21 Juan Quintela 2009-08-05 16:10:08 UTC
Created attachment 356359 [details]
Remove unused variable

Comment 22 Juan Quintela 2009-08-05 16:10:46 UTC
Created attachment 356360 [details]
Make local variable static

Comment 23 Juan Quintela 2009-08-05 16:11:29 UTC
Created attachment 356361 [details]
Remove duplicated declaration

Comment 24 Juan Quintela 2009-08-05 16:12:19 UTC
Created attachment 356362 [details]
Initialize variable to make gcc happy

Comment 25 Juan Quintela 2009-08-05 16:13:24 UTC
Created attachment 356363 [details]
Use right modifier for time_t

Comment 26 Juan Quintela 2009-08-05 16:13:57 UTC
Created attachment 356364 [details]
Remove unused variable

Comment 27 Juan Quintela 2009-08-05 16:14:51 UTC
Created attachment 356365 [details]
Reset handlers have a different type

Comment 28 Juan Quintela 2009-08-05 16:15:59 UTC
Created attachment 356366 [details]
Right type nb_sectors

Comment 29 Juan Quintela 2009-08-05 16:17:52 UTC
Created attachment 356368 [details]
Initialize variable to make gcc happy

Comment 30 Juan Quintela 2009-08-05 16:18:35 UTC
Created attachment 356369 [details]
If you change variable types, you also have to change printf

Comment 31 Juan Quintela 2009-08-05 16:19:09 UTC
Created attachment 356370 [details]
Make local variable static

Comment 32 Juan Quintela 2009-08-05 16:20:50 UTC
Created attachment 356371 [details]
Remove unused variable

Comment 33 Juan Quintela 2009-08-05 16:21:33 UTC
Created attachment 356372 [details]
perror is defined in <stdio.h>

Comment 34 Juan Quintela 2009-08-05 16:22:27 UTC
Created attachment 356373 [details]
Remove duplicated declaration

Comment 35 Juan Quintela 2009-08-05 16:24:41 UTC
Created attachment 356374 [details]
Remove duplicated declaration

Comment 36 Juan Quintela 2009-08-05 16:26:13 UTC
Created attachment 356375 [details]
Add cast to silence warning

Comment 37 Juan Quintela 2009-08-05 16:26:54 UTC
Created attachment 356376 [details]
Compile qemu with -Werror

Comment 38 Juan Quintela 2009-08-05 16:35:52 UTC
Created attachment 356378 [details]
Move several variables after .h that declares them as extern

Comment 39 Juan Quintela 2009-09-16 18:27:54 UTC
*** Bug 513255 has been marked as a duplicate of this bug. ***

Comment 40 Juan Quintela 2009-09-16 18:28:31 UTC
*** Bug 513263 has been marked as a duplicate of this bug. ***

Comment 43 Eduardo Habkost 2009-09-22 20:31:35 UTC
Not all warnings were fixed. More patches were posted on virtualist.

Comment 50 Juan Quintela 2010-01-12 13:10:50 UTC
Ignore them, please.

That are kvm only parts (not qemu ones) and they are not used anymore on upstream qemu/kvm (they are different).

Thanks for all the tracking.

Comment 53 errata-xmlrpc 2010-03-30 07:57:04 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0271.html