From kde-devel Thu Oct 28 20:15:26 2004 From: Adriaan de Groot Date: Thu, 28 Oct 2004 20:15:26 +0000 To: kde-devel Subject: Comparing pointers via cast to int? Message-Id: <200410282215.32359.groot () kde ! org> X-MARC-Message: https://marc.info/?l=kde-devel&m=109899465714276 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 For warnings-- type fixes, I was watching a base compile when this line of konqueror (konq_mainwindow.cc:1010) generated a warning: if ( senderFrame && viewFrame && (uint)viewFrame != (uint)senderFrame ) Now, senderFrame and viewFrame are both QObject *, and what's worse is that an int isn't necessarily big enough to hold those pointers. Would either of if ( senderFrame && viewFrame && viewFrame != senderFrame ) if ( senderFrame && viewFrame && (void *)viewFrame != (void *)senderFrame ) be acceptable? - -- Don't worry, 't ain't no shame to be stupid - ol' mouse. GPG: FEA2 A3FE Adriaan de Groot -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBgVNkdqzuAf6io/4RAuqrAJ9oH6QekHMLQeVSH1IkuO4InbMW8ACgklyD V4BHXvsTzcbqs2dA1SsG/sw= =/aGR -----END PGP SIGNATURE----- >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<