Bug 100569

Summary: core/resource.cpp:36:33: error: non-constant-expression cannot be narrowed from type 'int' to 'int16_t' (aka 'short') in initializer list [-Wc++11-narrowing]
Product: Mesa Reporter: Vinson Lee <vlee>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: normal    
Priority: medium CC: currojerez
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Vinson Lee 2017-04-04 21:31:05 UTC
mesa: 0de17f52a515e655682b4b894c44ad9d7308794e (17.1.0-devel)

  CXX      core/libclover_la-resource.lo
core/resource.cpp:36:33: error: non-constant-expression cannot be narrowed from type 'int' to 'int16_t' (aka 'short') in initializer list [-Wc++11-narrowing]
         pipe({ (int)origin[0], (int)origin[1],
                                ^~~~~~~~~~~~~~
core/resource.cpp:36:33: note: insert an explicit cast to silence this issue
         pipe({ (int)origin[0], (int)origin[1],
                                ^~~~~~~~~~~~~~
                                static_cast<int16_t>( )
Comment 1 Nicolai Hähnle 2017-04-05 09:43:13 UTC
Most likely caused by the recent change to make pipe_box smaller. Changing the affected cast from (int) to (int16_t) should be sufficient to fix this.
Comment 2 Aaron Watry 2017-04-05 14:20:55 UTC
Pushed as:

commit 4d0399f1755145b7c25f0aba0413e41e43e4cbbe
Author: Aaron Watry <awatry@gmail.com>
Date:   Tue Apr 4 20:16:02 2017 -0500

    st/clover: Fix build after shrink of pipe_box

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.