Review request: ~200 build warning fixes to kdebase

Xander Moore xndrcode at
Sat Jun 5 16:44:11 BST 2010

Thanks to everyone. I will attempt to make a few corrections and resend.

Some follow up questions:
1) For KProcess it sounds like there is a more current version of the source
where this fix makes sense.  Is there another branch I could work  in for

2) Can someone give me an example or two where a warning may be intended as
a reminder to clean up.... and then what the clean up should be?
    There are some cases where some ignored writes are at shutdown (writing
a byte to communicate another process) and I am not sure what other action
could be taken.  In other cases, the recovery action is not clear -- i.e.
log something (how to determine standard way?) and continue?

On Sat, Jun 5, 2010 at 4:55 AM, Rolf Eike Beer <kde at>wrote:

> Xander Moore wrote:
> > These are pretty basic fixes, but should get rid of annoying build
> warnings
> > for kdebase.
> > I  opened bug 240173 and attached the patch, but apparently that is not
> the
> > best way to get things reviwed and checked in.
> >
> > This is mostly:
> > 1) Initializing variables in all  code paths
> > 2) Checking return values of write() read() pipe()
> > 3) Adding Q_UNUSED(param) for unused parameters
> >
> > Thanks for reviewing and any tips.
> If you want to get rid of the return value of a function (e.g. nice() in
> the
> first hunk) try
>  (void) nice(...)
> Just some general notes about that low level C functions:
> Using int as the return code of strlen() will give compiler warnings on
> some
> platforms, e.g. Windows64. Use size_t there. Ok, that one is build only on
> Un*x, but anyway. The return code of write() is ssize_t, not int. The
> return
> value of write may be less than the given length without an error, you just
> have to send the rest of the buffer later.
> At the end I don't think that this makes any difference here. But this
> whole
> pipe()/write()/whatever stuff should just be thrown away and a KProcess
> should
> be used here. But for that sort of porting it's a bit late, that is 4.6
> stuff
> And the floppy ioslave. Hm. I don't think that makes any sense anymore.
> You are silencing some compiler warnings here that remind everybody that
> some
> of this low level fiddling really needs a cleanup. I fear if you shut them
> up
> nobody will touch these things for the next years again.
> Just my thoughts.
> Eike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kde-core-devel mailing list