Re: cppcheck on Dillo source
"Sebastian Geerken" <[email protected]>
| Newsgroups | gmane.comp.web.dillo.devel |
|---|---|
| Message-ID | <[email protected]> |
On Di, Jul 12, 2016, Jorge Arellano Cid wrote: > > Checking ../../slackbuilds/dillo/hg/dillo/dw/ooffloatsmgr.cc... > > [../../slackbuilds/dillo/hg/dillo/dw/ooffloatsmgr.cc:654]: (error) Possible null pointer dereference: vloat > > Well, the code should never reach there. > Not changed. > > @Sebastian, BTW, coincidentally I'm using something like: > > SortedFloatsVector *list; > list = isSubRefLeftFloat(ref) ? leftFloats : rightFloats; > Float *vloat = list->get (getFloatIndexFromSubRef (ref)); > > in some patches I have, which also silence cppcheck. But maybe the > original construct was meant for adding more options (like absolute > positioned floats), but those may end in a third floats array, so I'm > not sure. Is it safe to use the above construct, or should I leave it > as is? OOFFloatsMgr only deals with floats, so it should be safe. However, I'd like to keep assertNotReached() there, to make debugging easier. Sebastian _______________________________________________ Dillo-dev mailing list [email protected] http://lists.dillo.org/cgi-bin/mailman/listinfo/dillo-dev
signature.asc
(application/pgp-signature, 473 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJXi3H0AAoJEAw7+YHB+ZL6IyEIAK7r/r78nj8N6lF61uo88wFE TTQ24Ks//5QWJH2bfoehTV0lcDAdsLm907ecg3lKJB2N3rX5LmR8xGOStkuxHxb2 ZXQWUXXyvUEN6yg8do8mYp0duxdQCR/73laPDK366QMz7bRiI28r2/gkivHeU2rX S/2mJjs9tbJFPqlJ9pCZstJzaA5TTLIru9N2snExfNjdJs0eBRxfkgf8bKnMuSxQ iHtT6bZexeipoLLa0kQ8aWxIoAVXvxojxlAjfbyjVcKe1SAiFXjF5ViyjDGxCoab ngzpE3ZhIZN7H32FcQNv8Dw6PKJm9rNZ3HJNqnt8gJE3KK//7+rsef99Fz8NQNg= =donD -----END PGP SIGNATURE-----