Code review comment for lp:~mc-return/compiz/compiz.fix1030473-part3

Revision history for this message
MC Return (mc-return) wrote :

Another question:

In compizconfig/gsettings/src/gsettings.c:296] cppcheck throws a warning: Casting between double* and float* which have an incompatible binary data representation

Investigation shows that this is correct, but it could be by design:
First we find this:

    case TypeFloat:
 {
     double *array = malloc (nItems * sizeof (double));

then in line 296:

     list = ccsGetValueListFromFloatArray ((float *) array, nItems, setting);

In compizconfig/libcompizconfig/include/ccs.h line 978 says:

CCSSettingValueList ccsGetValueListFromFloatArray (float *array,
         int num,
         CCSSetting *parent);

Q: Should we fix this and if so how ?

« Back to merge proposal