[Mesa-dev] [Bug 103002] string_buffer_test.cpp:43: error: ISO C++ forbids initialization of member ‘str1’

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Sep 26 20:29:59 UTC 2017


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

            Bug ID: 103002
           Summary: string_buffer_test.cpp:43: error: ISO C++ forbids
                    initialization of member ‘str1’
           Product: Mesa
           Version: git
          Hardware: Other
                OS: All
            Status: NEW
          Keywords: bisected, regression
          Severity: normal
          Priority: medium
         Component: Mesa core
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: vlee at freedesktop.org
        QA Contact: mesa-dev at lists.freedesktop.org
                CC: Dieter at nuetzel-hh.de, nhaehnle at gmail.com,
                    thomashelland90 at gmail.com

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 at 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 at 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

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170926/c922e1b4/attachment.html>


More information about the mesa-dev mailing list