[Spice-devel] [PATCH spice-streaming-agent v2 2/4] Remove clang warning on missing 'override'

Christophe de Dinechin cdupontd at redhat.com
Thu Feb 15 14:58:15 UTC 2018



> On 15 Feb 2018, at 15:25, Frediano Ziglio <fziglio at redhat.com> wrote:
> 
>>> On 15 Feb 2018, at 11:00, Frediano Ziglio <fziglio at redhat.com> wrote:
>>> 
>>> From: Christophe de Dinechin <dinechin at redhat.com>
>>> 
>>> In file included from mjpeg-fallback.cpp:8:
>>> ./mjpeg-fallback.hpp:28:25: warning: 'VideoCodecType' overrides a member
>>> function but is not marked 'override' [-Winconsistent-missing-override]
>>>   SpiceVideoCodecType VideoCodecType() const;
>>>                       ^
>>> ../include/spice-streaming-agent/plugin.hpp:92:33: note: overridden virtual
>>> function is here
>>>   virtual SpiceVideoCodecType VideoCodecType() const = 0;
>>>                               ^
>>> 
>>> Signed-off-by: Christophe de Dinechin <dinechin at redhat.com>
>>> Acked-by: Frediano Ziglio <fziglio at redhat.com>
>>> ---
>>> Change since v1:
>>> - remove spurious hunk.
>> 
>> See, this is exactly what I want to avoid with the guideline about
>> whitespaces.
>> 
>> I would not have minded much if you had split the whitespace fix in a
>> separate commit ;-)
>> 
>> Sent separate patch for it, but why, oh why!
>> 
> 
> I rarely have these spurious space changes as you have.

That may be true, but on the other hand the extra space was committed by you… ;-)

> I think that the main issue is that your editor automatically is trying
> to adjust spaces causing it while my editor is just set to be more
> respectful of the current code.

Emacs is configurable both ways. Since our guidelines say “no trailing whitespaces”, I configured it accordingly.

Again, I really don’t want to have to post-process my patches manually to split-out whitespace corrections. I see that as “punishment for doing the right thing”.


>> ---
>>> src/mjpeg-fallback.cpp | 2 +-
>>> src/mjpeg-fallback.hpp | 2 +-
>>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>> 
>>> diff --git a/src/mjpeg-fallback.cpp b/src/mjpeg-fallback.cpp
>>> index 74682f3..3cb708a 100644
>>> --- a/src/mjpeg-fallback.cpp
>>> +++ b/src/mjpeg-fallback.cpp
>>> @@ -47,7 +47,7 @@ public:
>>>    ~MjpegFrameCapture();
>>>    FrameInfo CaptureFrame() override;
>>>    void Reset() override;
>>> -    SpiceVideoCodecType VideoCodecType() const {
>>> +    SpiceVideoCodecType VideoCodecType() const override {
>>>        return SPICE_VIDEO_CODEC_TYPE_MJPEG;
>>>    }
>>> private:
>>> diff --git a/src/mjpeg-fallback.hpp b/src/mjpeg-fallback.hpp
>>> index 04fa2eb..ca5c7d3 100644
>>> --- a/src/mjpeg-fallback.hpp
>>> +++ b/src/mjpeg-fallback.hpp
>>> @@ -25,7 +25,7 @@ public:
>>>    FrameCapture *CreateCapture() override;
>>>    unsigned Rank() override;
>>>    void ParseOptions(const ConfigureOption *options);
>>> -    SpiceVideoCodecType VideoCodecType() const;
>>> +    SpiceVideoCodecType VideoCodecType() const override;
>>> private:
>>>    MjpegSettings settings = { 10, 80 };
>>> };
> 
> Frediano
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel



More information about the Spice-devel mailing list