Bug 70218 - dbus-message.c: unused variable bytes_read in _dbus_message_loader_get_buffer
Summary: dbus-message.c: unused variable bytes_read in _dbus_message_loader_get_buffer
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: All All
: lowest minor
Assignee: Havoc Pennington
QA Contact:
URL:
Whiteboard: review-
Keywords: patch
Depends on:
Blocks:
 
Reported: 2013-10-07 08:46 UTC by Vasilyy
Modified: 2013-10-08 16:55 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
patch for resolving this problem. (7.63 KB, patch)
2013-10-07 08:46 UTC, Vasilyy
Details | Splinter Review
patch for resolving this problem. (8.55 KB, patch)
2013-10-08 07:47 UTC, Vasilyy
Details | Splinter Review
patch for resolving this problem. (8.07 KB, patch)
2013-10-08 09:54 UTC, Vasilyy
Details | Splinter Review

Description Vasilyy 2013-10-07 08:46:02 UTC
Created attachment 87221 [details] [review]
patch for resolving this problem.

Unused variable bytes_read in _dbus_message_loader_get_buffer. The author forgot to remove a variable in 271fa7fc335f332bb2be3beeef735334546c4957
Comment 1 Chengwei Yang 2013-10-08 03:26:15 UTC
Comment on attachment 87221 [details] [review]
patch for resolving this problem.

Review of attachment 87221 [details] [review]:
-----------------------------------------------------------------

My two humble suggestions:
    * Please check the "patch" box when uploading a patch, so it's easy to review in Splinter.
    * Please ensure every patch buildable and did a 'make check' before upload.

::: dbus/dbus-transport-socket.c
@@ -761,5 @@
>              {
>                _dbus_verbose ("Out of memory decoding incoming data\n");
>                _dbus_message_loader_return_buffer (transport->loader,
> -                                              buffer,
> -                                              _dbus_string_get_length (buffer) - orig_len);

After that, orig_len defined but not used any more, should be deleted.
Comment 2 Vasilyy 2013-10-08 07:47:24 UTC
Created attachment 87265 [details] [review]
patch for resolving this problem.
Comment 3 Vasilyy 2013-10-08 07:50:50 UTC
> My two humble suggestions:
>     * Please check the "patch" box when uploading a patch, so it's easy to
> review in Splinter.
>     * Please ensure every patch buildable and did a 'make check' before
> upload.

I'm sorry for my carelessness.
patch fixed.
Comment 4 Chengwei Yang 2013-10-08 08:08:48 UTC
Comment on attachment 87265 [details] [review]
patch for resolving this problem.

Review of attachment 87265 [details] [review]:
-----------------------------------------------------------------

::: dbus/dbus-transport.c
@@ +1072,1 @@
>                       orig_len);

still fail, orig_len used here but you removed it as above.
Comment 5 Vasilyy 2013-10-08 09:53:59 UTC
Oh, I have built and tested it with verbose mode off.
Comment 6 Vasilyy 2013-10-08 09:54:33 UTC
Created attachment 87270 [details] [review]
patch for resolving this problem.
Comment 7 Simon McVittie 2013-10-08 10:49:50 UTC
(In reply to comment #6)
> Created attachment 87270 [details] [review]
> patch for resolving this problem.

Looks good, testing in several build configurations now.
Comment 8 Vasilyy 2013-10-08 16:04:14 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Created attachment 87270 [details] [review] [review]
> > patch for resolving this problem.
> 
> Looks good, testing in several build configurations now.

It's OK.
Comment 9 Simon McVittie 2013-10-08 16:55:27 UTC
Fixed in git for 1.7.6


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.