Bug 75172 - intel_mipmap_tree.c:728:7: error: void function 'intel_update_winsys_renderbuffer_miptree' should not return a value [-Wreturn-type]
Summary: intel_mipmap_tree.c:728:7: error: void function 'intel_update_winsys_renderbu...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium blocker
Assignee: Eric Anholt
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2014-02-18 19:29 UTC by Vinson Lee
Modified: 2014-02-20 18:17 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Vinson Lee 2014-02-18 19:29:47 UTC
mesa: 03597cf802a7a89c4853794e6206ab8ab003898d (master)

clang build error

  CC       intel_mipmap_tree.lo
intel_mipmap_tree.c:728:7: error: void function 'intel_update_winsys_renderbuffer_miptree' should not return a value [-Wreturn-type]
      return NULL;
      ^      ~~~~
Comment 1 Ian Romanick 2014-02-18 23:04:43 UTC
I see two problems in the function that prevent me from proposing the obvious, trivial fix.

1. This looks like an error case, and the caller should be signaled.  It looks like previous to 019560c1 the caller was signaled, but ignored it.

2. It looks like there's a potential leak of irb->singlesample_mt, but I don't know the surrounding code well enough to be sure.
Comment 2 Vinson Lee 2014-02-19 20:06:59 UTC
019560c127778dc3b08bdc7c3acdc68dbbb80ea0 is the first bad commit
commit 019560c127778dc3b08bdc7c3acdc68dbbb80ea0
Author: Eric Anholt <eric@anholt.net>
Date:   Thu Feb 13 14:33:57 2014 -0800

    i965: Drop some duplicated code in DRI winsys BO updates.
    
    The only DRI2 vs DRI3 delta was just how to decide about frontbuffer-ness
    for doing the upsample.
    
    v2: Fix missing singlesample_mt->region->name update in the merged code,
        which would have broken the DRI2 don't-recreate-the-miptree
        optimization.
    
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

:040000 040000 55c5d368bfdbd863fc60c941281bc59bce1417c6 8945d7e2d32c0424cb3a6e9aa880aebdc585f59d M	src
bisect run success
Comment 3 Eric Anholt 2014-02-20 18:17:06 UTC
commit 5bc0b2f4321fe623e37535aa1ff1848aa5a2dec1
Author: Eric Anholt <eric@anholt.net>
Date:   Thu Feb 20 09:51:23 2014 -0800

    i965: Fix extra return value after winsys rb update refactor.


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.