silence compiler warning about wrong type in kinfocenter

Review Request #109063 - Created Feb. 20, 2013 and submitted

Information
Martin Walch
kde-workspace
Reviewers
kinfocenter
gcc complains:
kpci.cpp: In function 'QTreeWidgetItem* addCapsAgp(QTreeWidgetItem*, QTreeWidgetItem*, pciInfo*, int)':
kpci.cpp:584: warning: format '%08X' expects type 'unsigned int', but argument 3 has type 'agpInfo::<anonymous struct>::<anonymous union>'

The compiler warns that infoAgp.cooked.config is an anonymous union, but the format string of sprintf expects an unsigned int. The author probably meant infoAgp.cooked.config.config (note the second .config), which is the first value in the union, an unsigned int.

This patch fixes it.
Compiles fine with gcc 4.4.7.
The mentioned warning is gone.
kinfocenter seems to run fine.
However, I guess for specific runtime testing, an AGP card is needed (not sure about that), which I do not have.
David Stephen Hubner
Martin Walch
Review request changed

Status: Closed (submitted)

Loading...