Bug 515749 - Remove warnings from kvm compilation
Summary: Remove warnings from kvm compilation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm
Version: 5.5
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Juan Quintela
QA Contact: Lawrence Lim
URL:
Whiteboard:
: 513255 513263 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-05 15:34 UTC by Juan Quintela
Modified: 2014-03-26 01:00 UTC (History)
7 users (show)

Fixed In Version: kvm-83-125.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 07:57:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Use quiet command to have a cleaner command line (5.26 KB, patch)
2009-08-05 15:50 UTC, Juan Quintela
no flags Details | Diff
Remove unused function (1.17 KB, patch)
2009-08-05 15:51 UTC, Juan Quintela
no flags Details | Diff
Remove unused variable (904 bytes, patch)
2009-08-05 15:51 UTC, Juan Quintela
no flags Details | Diff
Right argument number (1.07 KB, patch)
2009-08-05 15:52 UTC, Juan Quintela
no flags Details | Diff
Use right type uint8_t isntead of char (955 bytes, patch)
2009-08-05 15:53 UTC, Juan Quintela
no flags Details | Diff
Use C99 function declaration, not K&R (816 bytes, patch)
2009-08-05 15:54 UTC, Juan Quintela
no flags Details | Diff
Add missing static modifiers (1.37 KB, patch)
2009-08-05 15:57 UTC, Juan Quintela
no flags Details | Diff
Use only one declaration by extern variable (1.39 KB, patch)
2009-08-05 15:57 UTC, Juan Quintela
no flags Details | Diff
Don't redeclare external variable kvm_allowed (1.03 KB, patch)
2009-08-05 15:58 UTC, Juan Quintela
no flags Details | Diff
Put prototype in header (1.56 KB, patch)
2009-08-05 16:01 UTC, Juan Quintela
no flags Details | Diff
Mark another variable static (941 bytes, patch)
2009-08-05 16:02 UTC, Juan Quintela
no flags Details | Diff
mp_state is uint32_t (1.06 KB, patch)
2009-08-05 16:03 UTC, Juan Quintela
no flags Details | Diff
More static functions (938 bytes, patch)
2009-08-05 16:03 UTC, Juan Quintela
no flags Details | Diff
Use uint32_t instead of int (1.07 KB, patch)
2009-08-05 16:05 UTC, Juan Quintela
no flags Details | Diff
Use right type (1.00 KB, patch)
2009-08-05 16:05 UTC, Juan Quintela
no flags Details | Diff
Don't use reason parameter, that don't exist in our version (1.01 KB, patch)
2009-08-05 16:06 UTC, Juan Quintela
no flags Details | Diff
Remove unused variable (1.09 KB, patch)
2009-08-05 16:07 UTC, Juan Quintela
no flags Details | Diff
Another missing prototype (1.72 KB, patch)
2009-08-05 16:08 UTC, Juan Quintela
no flags Details | Diff
var used as uint32_t should be declared as that (981 bytes, patch)
2009-08-05 16:08 UTC, Juan Quintela
no flags Details | Diff
Remove duplicated declaration (927 bytes, patch)
2009-08-05 16:09 UTC, Juan Quintela
no flags Details | Diff
Remove unused variable (910 bytes, patch)
2009-08-05 16:10 UTC, Juan Quintela
no flags Details | Diff
Make local variable static (1.04 KB, patch)
2009-08-05 16:10 UTC, Juan Quintela
no flags Details | Diff
Remove duplicated declaration (915 bytes, patch)
2009-08-05 16:11 UTC, Juan Quintela
no flags Details | Diff
Initialize variable to make gcc happy (2.96 KB, patch)
2009-08-05 16:12 UTC, Juan Quintela
no flags Details | Diff
Use right modifier for time_t (992 bytes, patch)
2009-08-05 16:13 UTC, Juan Quintela
no flags Details | Diff
Remove unused variable (1.11 KB, patch)
2009-08-05 16:13 UTC, Juan Quintela
no flags Details | Diff
Reset handlers have a different type (978 bytes, patch)
2009-08-05 16:14 UTC, Juan Quintela
no flags Details | Diff
Right type nb_sectors (1.03 KB, patch)
2009-08-05 16:15 UTC, Juan Quintela
no flags Details | Diff
Initialize variable to make gcc happy (1.09 KB, patch)
2009-08-05 16:17 UTC, Juan Quintela
no flags Details | Diff
If you change variable types, you also have to change printf (1.18 KB, patch)
2009-08-05 16:18 UTC, Juan Quintela
no flags Details | Diff
Make local variable static (1.70 KB, patch)
2009-08-05 16:19 UTC, Juan Quintela
no flags Details | Diff
Remove unused variable (920 bytes, patch)
2009-08-05 16:20 UTC, Juan Quintela
no flags Details | Diff
perror is defined in <stdio.h> (867 bytes, patch)
2009-08-05 16:21 UTC, Juan Quintela
no flags Details | Diff
Remove duplicated declaration (888 bytes, patch)
2009-08-05 16:22 UTC, Juan Quintela
no flags Details | Diff
Remove duplicated declaration (958 bytes, patch)
2009-08-05 16:24 UTC, Juan Quintela
no flags Details | Diff
Add cast to silence warning (1.18 KB, patch)
2009-08-05 16:26 UTC, Juan Quintela
no flags Details | Diff
Compile qemu with -Werror (941 bytes, patch)
2009-08-05 16:26 UTC, Juan Quintela
no flags Details | Diff
Move several variables after .h that declares them as extern (1.19 KB, patch)
2009-08-05 16:35 UTC, Juan Quintela
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0271 0 normal SHIPPED_LIVE Important: kvm security, bug fix and enhancement update 2010-03-29 13:19:48 UTC

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


Note You need to log in before you can comment on or make changes to this bug.