[gdal-dev] PVS-Studio "missing move constructor" warnings ?

Andrew C Aitchison andrew at aitchison.me.uk
Sun Oct 16 01:26:34 PDT 2022


When I run the PVS-Studio static analyzer https://pvs-studio.com/
on my driver plugin I get two warnings on cpl code:

PVS-Studio Analysis Results

    Date: Sun Oct 16 09:12:51 2022
    PVS-Studio Version: 7.21.64848.262
    Command Line: plog-converter -a GA\:1,2 -t fullhtml -o pvs.dir qctdataset.pvs.log
    qctvector.pvs.log qct.pvs.log qed.pvs.log
    Total Warnings (GA): 2

    Group Location Level Code Message
    General Analysis cpl_string.h:429 Medium V690 The 'CPLStringList' class
    implements the move assignment operator, but lacks a move constructor.
    It is dangerous to use such a class.

    General Analysis cpl_json.h:53 Medium V690 The 'CPLJSONObject' class
    implements the move assignment operator, but lacks a move constructor.
    It is dangerous to use such a class.

Any idea whether there is a missing move constructor
and whether this is a problem ?

Thanks,

-- 
Andrew C. Aitchison                      Kendal, UK
                    andrew at aitchison.me.uk


More information about the gdal-dev mailing list