Skip to contentSkip to conversation

main - tests: a bit more fancy way to initialized struct

PATCH Zdenek Kabelac 1 participant 1 message Sep 20, 2021

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1a8a33ae9b39567e2a2cc399f13cebecb5fa2dea
Commit:        1a8a33ae9b39567e2a2cc399f13cebecb5fa2dea
Parent:        4c0354fe0fc2f42ec35c57cc69444a825e5c5386
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Mon Sep 20 16:01:22 2021 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Mon Sep 20 16:01:22 2021 +0200

tests: a bit more fancy way to initialized struct

Older g++ is not smart enough to figure this out, so add a bit more push.

---
 test/lib/brick-shelltest.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
test/lib/brick-shelltest.h +1 -1
index b3b62a308..af2810521 100644
@@ -988,7 +988,7 @@ struct TestCase {
 
     TestCase( Journal &j, Options opt, std::string path, std::string _name, std::string _flavour )
         : child( path ), name( _name ), flavour( _flavour ),
-          iobuf( NULL ), usage( { 0 } ), status( 0 ), timeout( false ),
+          iobuf( NULL ), usage( (struct rusage) { { 0 } } ), status( 0 ), timeout( false ),
           pid( 0 ), start( 0 ), end( 0 ), silent_start( 0 ),
           last_update( 0 ), last_heartbeat( 0 ), options( opt ), journal( &j )
     {