lycis / QtDropbox

Dropbox API for Qt
GNU Lesser General Public License v3.0
102 stars 47 forks source link

Possibly mismatching if/else #20

Closed HappySeaFox closed 11 years ago

HappySeaFox commented 11 years ago

GCC 4.8.1 warns about the following code:

    if(myEntry.type == QDROPBOXJSON_TYPE_JSON)
        if(myEntry.value.json->compare(*yourEntry.value.json) != 0)
            return 1;
    else
        if(myEntry.value.value->compare(yourEntry.value.value) != 0)
            return 1;

Looks like if/else mismatch. Did you mean

    if(myEntry.type == QDROPBOXJSON_TYPE_JSON)
    {
        if(myEntry.value.json->compare(*yourEntry.value.json) != 0)
            return 1;
    }
    else
        if(myEntry.value.value->compare(yourEntry.value.value) != 0)
            return 1;

?