Hi,
On Thu, Feb 15, 2018 at 07:14:14AM +, Frediano Ziglio wrote:
> Some header used some slightly different naming style for
> header guards.
> Update the names to make them more coherent.
>
> Signed-off-by: Frediano Ziglio
> ---
> src/hexdump.h | 4 ++--
> src/jpeg.hpp
Some header used some slightly different naming style for
header guards.
Update the names to make them more coherent.
Signed-off-by: Frediano Ziglio
---
src/hexdump.h | 4 ++--
src/jpeg.hpp | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git
>
> From: Christophe de Dinechin
>
> 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()
>
> From: Christophe de Dinechin
>
> Signed-off-by: Christophe de Dinechin
> ---
> src/spice-streaming-agent.cpp | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/spice-streaming-agent.cpp
>
> From: Christophe de Dinechin
>
> Signed-off-by: Christophe de Dinechin
> ---
> src/spice-streaming-agent.cpp | 49
> +--
> 1 file changed, 29 insertions(+), 20 deletions(-)
>
> diff --git
>
> From: Christophe de Dinechin
>
> Signed-off-by: Christophe de Dinechin
> ---
> src/spice-streaming-agent.cpp | 43
> ---
> 1 file changed, 24 insertions(+), 19 deletions(-)
>
> diff --git
>
> From: Christophe de Dinechin
>
> Signed-off-by: Christophe de Dinechin
> ---
> src/spice-streaming-agent.cpp | 5 +
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/src/spice-streaming-agent.cpp
>
> From: Christophe de Dinechin
>
> 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()
>
> From: Christophe de Dinechin
>
> ./static-plugin.hpp:29:5: warning: 'const' qualifier on function type
> 'PluginInitFunc' (aka 'bool (spice::streaming_agent::Agent *)') has no
> effect [-Wignored-qualifiers]
> const PluginInitFunc* const init_func;
> ^~
>
>
>
> From: Christophe de Dinechin
>
> Signed-off-by: Christophe de Dinechin
> ---
> src/spice-streaming-agent.cpp | 7 +--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/spice-streaming-agent.cpp
>
> From: Christophe de Dinechin
>
> As per e-mail discussions (https://patchwork.freedesktop.org/patch/200629/),
> using std::string for C-style string constants is against C++ good practices,
> see
>
>
> From: Christophe de Dinechin
>
> Signed-off-by: Christophe de Dinechin
> ---
> src/spice-streaming-agent.cpp | 16
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/src/spice-streaming-agent.cpp
>
> From: Christophe de Dinechin
>
> Otherwise, clang complains:
>
> spice-streaming-agent.cpp:414:66: warning: format specifies type 'unsigned
> long' but the argument has type 'uint64_t' (aka 'unsigned long long')
> [-Wformat]
> fprintf(f_log, "%lu:
>
> From: Christophe de Dinechin
>
> We should really not be capturing cursor by reference here,
> since that value could be changed by the surrounding loop and sending
> the data could some day be made asynchronous.
>
> Signed-off-by: Christophe de Dinechin
>
> From: Christophe de Dinechin
>
> Signed-off-by: Christophe de Dinechin
> ---
> src/spice-streaming-agent.cpp | 8
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/spice-streaming-agent.cpp
>
> From: Christophe de Dinechin
>
> Without this, clang emits among others:
>
> spice-streaming-agent.cpp:355:31: error: implicit instantiation of undefined
> template 'std::__1::basic_string std::__1::allocator >'
> streamfd =
> On 9 Feb 2018, at 17:59, Frediano Ziglio wrote:
>
> +
> +// read part of the message till we get all
> +if (dev->msg_len < dev->hdr.size) {
> +dev->msg = g_realloc(dev->msg, dev->hdr.size);
> +dev->msg_len =
> On 14 Feb 2018, at 14:35, Christophe Fergeau wrote:
>
> This one sounds more like an RFC to me
Well, this is really a bug fix in the documentation more than a RFC.
> , as from a quick look in server/,
> this is not the style currently in use.
As I pointed out in
> On 14 Feb 2018, at 14:37, Christophe Fergeau wrote:
>
> On Thu, Feb 08, 2018 at 12:25:30PM +0100, Christophe de Dinechin wrote:
>> From: Christophe de Dinechin
>>
>> The objective of these guidelines is that:
>> - We avoid introducing new warnings
> On 14 Feb 2018, at 17:29, Christophe Fergeau wrote:
>
> This changes the suggested style to what is currently used in
> spice-server codebase. This also removes a few sentences which
> are not really related to how one should format their header guards.
>
>
> On 14 Feb 2018, at 17:34, Christophe Fergeau wrote:
>
> On Wed, Feb 14, 2018 at 10:45:56AM -0500, Frediano Ziglio wrote:
>>>
>>> Shouldn't this go with a Makefile rule? A few lines in the log what this
>>> is about, what is the goal for having this file, ... would not
I cut quite a bit for clarity. What I cut I agree with ;-)
> On 14 Feb 2018, at 14:45, Lukáš Hrázký wrote:
>
> On Tue, 2018-02-13 at 17:10 +0100, Christophe de Dinechin wrote:
>> Hi Lukas,
>>
>
> For your comments which are unrelated to my changes, I commended
> uniformly
From: Christophe de Dinechin
Without this, clang emits among others:
spice-streaming-agent.cpp:355:31: error: implicit instantiation of undefined
template 'std::__1::basic_string'
streamfd = open(streamport.c_str(),
From: Christophe de Dinechin
Otherwise, clang complains:
spice-streaming-agent.cpp:414:66: warning: format specifies type 'unsigned
long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
fprintf(f_log, "%lu: Frame of %zu
From: Christophe de Dinechin
./static-plugin.hpp:29:5: warning: 'const' qualifier on function type
'PluginInitFunc' (aka 'bool (spice::streaming_agent::Agent *)') has no effect
[-Wignored-qualifiers]
const PluginInitFunc* const init_func;
^~
Signed-off-by:
From: Christophe de Dinechin
Signed-off-by: Christophe de Dinechin
---
src/spice-streaming-agent.cpp | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
index
From: Christophe de Dinechin
Signed-off-by: Christophe de Dinechin
---
src/spice-streaming-agent.cpp | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
index
From: Christophe de Dinechin
Signed-off-by: Christophe de Dinechin
---
src/spice-streaming-agent.cpp | 43 ---
1 file changed, 24 insertions(+), 19 deletions(-)
diff --git a/src/spice-streaming-agent.cpp
From: Christophe de Dinechin
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;
From: Christophe de Dinechin
Signed-off-by: Christophe de Dinechin
---
src/spice-streaming-agent.cpp | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
index
From: Christophe de Dinechin
This series implements a number of comments that were made during
previous code reviews, including a reworked / udpated version of the
stream RAII patch.
Christophe de Dinechin (14):
Add required header
Capture 'cursor' by value
From: Christophe de Dinechin
As per e-mail discussions (https://patchwork.freedesktop.org/patch/200629/),
using std::string for C-style string constants is against C++ good practices,
see
From: Christophe de Dinechin
We should really not be capturing cursor by reference here,
since that value could be changed by the surrounding loop and sending
the data could some day be made asynchronous.
Signed-off-by: Christophe de Dinechin
---
From: Christophe de Dinechin
Signed-off-by: Christophe de Dinechin
---
src/spice-streaming-agent.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
index
From: Christophe de Dinechin
This lets us get rid of C-style 'goto done' in do_capture.
Signed-off-by: Christophe de Dinechin
---
src/spice-streaming-agent.cpp | 32
1 file changed, 20 insertions(+), 12 deletions(-)
From: Christophe de Dinechin
Signed-off-by: Christophe de Dinechin
---
src/spice-streaming-agent.cpp | 49 +--
1 file changed, 29 insertions(+), 20 deletions(-)
diff --git a/src/spice-streaming-agent.cpp
From: Christophe de Dinechin
Signed-off-by: Christophe de Dinechin
---
src/spice-streaming-agent.cpp | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
>
> It was mainly a debugging feature for the early development stages. It
> was agreed its usefulness is at the moment outweighed by the complexity
> it brings to the code.
>
> Signed-off-by: Lukáš Hrázký
Acked-by: Frediano Ziglio
Frediano
> ---
>
On Thu, Feb 08, 2018 at 11:09:35AM +0100, Victor Toso wrote:
> Hi,
>
> On Thu, Feb 08, 2018 at 05:01:05AM -0500, Frediano Ziglio wrote:
> > > > Depends on many cases. You don't want spurious changes to make harder to
> > > > look at the history for instance (that is a point for Nack).
> > > > The
On Wed, Feb 14, 2018 at 10:40:58AM -0500, Frediano Ziglio wrote:
> >
> > > On 14 Feb 2018, at 13:34, Lukáš Hrázký wrote:
> > >
> > > Introduce a unit test framework (Catch) to the codebase and a simple
> > > unit test for parsing the options of the mjpeg plugin.
> > >
> > >
On Wed, Feb 14, 2018 at 10:45:56AM -0500, Frediano Ziglio wrote:
> >
> > Shouldn't this go with a Makefile rule? A few lines in the log what this
> > is about, what is the goal for having this file, ... would not hurt.
> >
> > Christophe
> >
>
> I think this file is supposed to just help
This changes the suggested style to what is currently used in
spice-server codebase. This also removes a few sentences which
are not really related to how one should format their header guards.
Signed-off-by: Christophe Fergeau
---
docs/spice_style.txt | 6 ++
1 file
> On 14 Feb 2018, at 16:43, Christophe Fergeau wrote:
>
> On Thu, Feb 08, 2018 at 12:25:29PM +0100, Christophe de Dinechin wrote:
>> From: Christophe de Dinechin
>>
>> Signed-off-by: Christophe de Dinechin
>> ---
>>
It was mainly a debugging feature for the early development stages. It
was agreed its usefulness is at the moment outweighed by the complexity
it brings to the code.
Signed-off-by: Lukáš Hrázký
---
Changes since v2:
- fix grammar in the description
- use ternary if for
>
> Shouldn't this go with a Makefile rule? A few lines in the log what this
> is about, what is the goal for having this file, ... would not hurt.
>
> Christophe
>
I think this file is supposed to just help developers so should not
be in the Makefile.
I think you mean that the intention
On Thu, Feb 08, 2018 at 12:25:29PM +0100, Christophe de Dinechin wrote:
> From: Christophe de Dinechin
>
> Signed-off-by: Christophe de Dinechin
> ---
> docs/spice_style.txt | 19 +++
> 1 file changed, 19 insertions(+)
>
> diff --git
>
> > On 14 Feb 2018, at 13:34, Lukáš Hrázký wrote:
> >
> > Introduce a unit test framework (Catch) to the codebase and a simple
> > unit test for parsing the options of the mjpeg plugin.
> >
> > Signed-off-by: Lukáš Hrázký
> > ---
> > configure.ac
On Wed, 2018-02-14 at 16:08 +0100, Christophe de Dinechin wrote:
> > On 14 Feb 2018, at 13:34, Lukáš Hrázký wrote:
> >
> > Introduce a unit test framework (Catch) to the codebase and a simple
> > unit test for parsing the options of the mjpeg plugin.
> >
> > Signed-off-by:
On Wed, 2018-02-14 at 09:22 -0500, Frediano Ziglio wrote:
> >
> > Introduce a unit test framework (Catch) to the codebase and a simple
> > unit test for parsing the options of the mjpeg plugin.
> >
> > Signed-off-by: Lukáš Hrázký
> > ---
> > configure.ac
> On 14 Feb 2018, at 15:28, Christophe Fergeau wrote:
>
> On Thu, Feb 08, 2018 at 08:16:37AM +0100, Christophe de Dinechin wrote:
>> Using std::string by default is *not* considered a good practice in
>> C++. The reference for C++ good practices are probably best
> On 14 Feb 2018, at 13:34, Lukáš Hrázký wrote:
>
> Introduce a unit test framework (Catch) to the codebase and a simple
> unit test for parsing the options of the mjpeg plugin.
>
> Signed-off-by: Lukáš Hrázký
> ---
> configure.ac
On Thu, Feb 08, 2018 at 08:16:37AM +0100, Christophe de Dinechin wrote:
> Using std::string by default is *not* considered a good practice in
> C++. The reference for C++ good practices are probably best summarized
> by the C++ Core Guidelines:
>
>
> Introduce a unit test framework (Catch) to the codebase and a simple
> unit test for parsing the options of the mjpeg plugin.
>
> Signed-off-by: Lukáš Hrázký
> ---
> configure.ac | 3 ++
> src/mjpeg-fallback.cpp| 5 +++
>
On Mon, Jan 29, 2018 at 05:16:12PM -0500, Frediano Ziglio wrote:
> >
> >
> > > On 29 Jan 2018, at 12:00, Frediano Ziglio wrote:
> > >
> > > Signed-off-by: Frediano Ziglio
> > > ---
> > > Makefile.am | 4 ++--
> > > 1 file changed, 2 insertions(+), 2
On 02/14/2018 01:58 PM, Lukáš Hrázký wrote:
It was mainly a debugging feature for the early development stages. It
was agreed it's usefulness is at the moment outweighted by the
its usefulness ...
spellchecker also suggests: outweighed
Looks good, see nit comment below (not important,
On Thu, Feb 08, 2018 at 12:25:30PM +0100, Christophe de Dinechin wrote:
> From: Christophe de Dinechin
>
> The objective of these guidelines is that:
> - We avoid introducing new warnings
> - We know how to fix old ones
> - We don't have to isolate whitespace changes when
This one sounds more like an RFC to me, as from a quick look in server/,
this is not the style currently in use.
Christophe
On Thu, Feb 08, 2018 at 12:25:31PM +0100, Christophe de Dinechin wrote:
> From: Christophe de Dinechin
>
> As written, the headers style guide looks
On Mon, Feb 12, 2018 at 03:23:06AM -0500, Frediano Ziglio wrote:
> See
> https://lists.freedesktop.org/archives/spice-devel/2018-February/041724.html
>
> > From: Christophe de Dinechin
> >
> > Signed-off-by: Christophe de Dinechin
> > ---
> >
On Thu, Feb 08, 2018 at 03:58:46AM -0500, Frediano Ziglio wrote:
> > +
> > +[source,h]
> > +---
> > +#ifndef MY_MODULE_H
> > +#define MY_MODULE_H
> > +
> > +...
> > +
> > +#endif /* MY_MODULE_H */
> > +---
> > +
>
> Are we suggesting C style only comment or is clear the is not important?
> (I'm
On Thu, Feb 08, 2018 at 03:50:37AM -0500, Frediano Ziglio wrote:
> >
> > From: Christophe de Dinechin
> >
> > Signed-off-by: Christophe de Dinechin
> > ---
> > docs/spice_style.txt | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >
On Thu, Feb 08, 2018 at 03:48:46AM -0500, Frediano Ziglio wrote:
> I think that the "Alternatively, use global `const` variables."
> is quite an ancient comment when spice-server was in C++
> (much before I join and I think even older than the git repository!)
There was a C++ *client* in
Shouldn't this go with a Makefile rule? A few lines in the log what this
is about, what is the goal for having this file, ... would not hurt.
Christophe
On Thu, Feb 08, 2018 at 12:25:21PM +0100, Christophe de Dinechin wrote:
> From: Christophe de Dinechin
>
>
On Thu, Feb 08, 2018 at 12:25:24PM +0100, Christophe de Dinechin wrote:
> From: Christophe de Dinechin
>
> Signed-off-by: Christophe de Dinechin
> ---
> docs/spice_style.txt | 15 ---
> 1 file changed, 12 insertions(+), 3 deletions(-)
>
>
On Tue, Feb 13, 2018 at 02:40:38PM +0100, Christophe de Dinechin wrote:
>
>
> > On 13 Feb 2018, at 14:39, Frediano Ziglio wrote:
> >
> >>>
> >>> On 12 Feb 2018, at 17:58, Frediano Ziglio wrote:
> >>>
> >>> In SPICE, as in Glib, ERROR is more "strong"
Use C++ standard library:
- std::string
- std::stoi() to parse the numbers (also note atoi() behavior is undefined in
case of errors)
- exceptions for errors, makes testing and potential future changes to
error handling easier.
Signed-off-by: Lukáš Hrázký
---
Introduce a unit test framework (Catch) to the codebase and a simple
unit test for parsing the options of the mjpeg plugin.
Signed-off-by: Lukáš Hrázký
---
configure.ac | 3 ++
src/mjpeg-fallback.cpp| 5 +++
src/mjpeg-fallback.hpp
Signed-off-by: Lukáš Hrázký
---
src/unittests/.gitignore | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/unittests/.gitignore b/src/unittests/.gitignore
index bb238d7..af41c48 100644
--- a/src/unittests/.gitignore
+++ b/src/unittests/.gitignore
@@ -1 +1,4 @@
This series introduces a C++ unit test framework called Catch to the
codebase, adds a simple unit test for the options parsing for the mjpeg
plugin and improves on the option parsing code.
Since we more or less agreed we can solve the Catch package in RHEL one
way or another, I suppose we can
It was mainly a debugging feature for the early development stages. It
was agreed it's usefulness is at the moment outweighted by the
complexity it brings to the code.
Signed-off-by: Lukáš Hrázký
---
Changes since v1:
- Log also to stderr if it's a tty
> On 14 Feb 2018, at 11:46, Lukáš Hrázký wrote:
>
> It was mainly a debugging feature for the early development stages. It
> was agreed it's usefulness is at the moment outweighted by the
> complexity it brings to the code.
>
> Signed-off-by: Lukáš Hrázký
It was mainly a debugging feature for the early development stages. It
was agreed it's usefulness is at the moment outweighted by the
complexity it brings to the code.
Signed-off-by: Lukáš Hrázký
---
src/spice-streaming-agent.cpp | 71
71 matches
Mail list logo