Skip to contentSkip to conversation

mesa-17.1.7/src/gallium/auxiliary/pipebuffer/pb_cache.c:169]: (style) Suspicious condition

Bug 102342 [email protected] 1 participant 2 messages Aug 21, 2017 – Apr 3, 2018

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=102342

Bug ID: 102342
Summary: mesa-17.1.7/src/gallium/auxiliary/pipebuffer/pb_cache.
c:169]: (style) Suspicious condition
Product: Mesa
Version: 17.1
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/radeonsi
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]

mesa-17.1.7/src/gallium/auxiliary/pipebuffer/pb_cache.c:169]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.

Source code is

      if (!entry && (ret = pb_cache_is_buffer_compat(cur_entry, size,
                                                     alignment, usage) > 0))

maybe better code

      if (!entry && ((ret = pb_cache_is_buffer_compat(cur_entry, size,
                                                     alignment, usage)) > 0))
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author Reviewed-by Marek Olšák
#1 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=102342

Timothy Arceri <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from Timothy Arceri <[email protected]> --- Thanks for reporting this.

Fixed by:

commit 7e9b7ec094500f1245eed518592f99244e54a753 (HEAD -> master, origin/master, origin/HEAD)

Author: Timothy Arceri <[email protected]>
Date:   Sun Apr 1 09:32:28 2018 +1000

gallium/pipebuffer: fix parenthesis location

Without this the return value will never get set to -1. This was first added in 49866c8f3457 and copied in 2b396eeed983.

Fixes 2b396eeed983 "gallium/pb_cache: add a copy of cache bufmgr

independent of pb_manager"

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102342

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel