Bug 103002 - string_buffer_test.cpp:43: error: ISO C++ forbids initialization of member ‘str1’
Summary: string_buffer_test.cpp:43: error: ISO C++ forbids initialization of member ‘s...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords: bisected, regression
Depends on:
Blocks:
 
Reported: 2017-09-26 20:29 UTC by Vinson Lee
Modified: 2017-09-30 23:54 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Vinson Lee 2017-09-26 20:29:59 UTC
mesa: 8822ea100cfd7482290c3c6b2a7200c8b888a7f4 (master 17.3.0-devel)

Build error with g++ 4.4.

  CXX    string_buffer_test.o
string_buffer_test.cpp:43: error: ISO C++ forbids initialization of member ‘str1’
string_buffer_test.cpp:43: error: making ‘str1’ static
string_buffer_test.cpp:43: error: invalid in-class initialization of static data member of non-integral type ‘const char*’


Introduced with this commit.

commit 584a2a22ea40cdc030db5b1d70b23dddcc06a556
Author: Thomas Helland <thomashelland90@gmail.com>
Date:   Fri May 19 22:07:17 2017 +0200

    util: Add tests for the string buffer
    
    More tests could probably be added, but this should cover
    concatenation, resizing, clearing, formatted printing,
    and checking the length, so it should be quite complete.
    
    Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
    Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
    Tested-by: Dieter Nützel <Dieter at nuetzel-hh.de>
    
    V2: Address review feedback from Timothy, plus fixes
       - Use a large enough char array
       - Actually test the formatted appending
       - Test that clear function resets string length
    
    V3: Port to gtest
    
    V4: Fix test makefile
        Fix copyright header
        Fix missing extern C
        Use more appropriate name for C-file
        Add tests for append_char
Comment 1 Thomas Helland 2017-09-30 23:54:04 UTC
This should be fixed by commit ce09364d4ec527ceee5be8bf4a08fb27cd2bf152


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.