[Git][lvmteam/lvm2][main] tests: old g++ needs explicit cast

Zdeněk Kabeláč (@zdenek.kabelac) <[email protected]>
Newsgroups gmane.linux.lvm.devel
Message-ID <651bf45c876f0_2aa52a869022@gitlab-sidekiq-low-urgency-cpu-bound-v2-5b59ddf494-brpsk.mail>

Zdeněk Kabeláč pushed to branch main at LVM team / lvm2


Commits:
0e8c631f by Zdenek Kabelac at 2023-10-03T12:59:38+02:00
tests: old g++ needs explicit cast

- - - - -


1 changed file:

- test/lib/brick-shelltest.h


Changes:

=====================================
test/lib/brick-shelltest.h
=====================================
@@ -103,8 +103,8 @@ class Timespec {
     struct timespec ts;
     static const long _NSEC_PER_SEC = 1000000000;
 public:
-    Timespec( time_t _sec = 0, long _nsec = 0 ) { ts = { _sec, _nsec }; }
-    Timespec( const struct timeval &tv ) { ts = { tv.tv_sec, tv.tv_usec * 1000 }; }
+    Timespec( time_t _sec = 0, long _nsec = 0 ) { ts = (struct timespec) { _sec, _nsec }; }
+    Timespec( const struct timeval &tv ) { ts = (struct timespec) { tv.tv_sec, tv.tv_usec * 1000 }; }
     long sec() const { return (long)ts.tv_sec; }
     long nsec() const { return (long)ts.tv_nsec; }
     void gettime() {
@@ -941,7 +941,7 @@ struct TestCase {
                 return false;
             }
 
-        struct timeval wait = { 0, 500000 /* timeout 0.5s */ };
+        struct timeval wait = (struct timeval) { 0, 500000 /* timeout 0.5s */ };
         fd_set set;
 
         FD_ZERO( &set );



View it on GitLab: https://gitlab.com/lvmteam/lvm2/-/commit/0e8c631f5e58473d7f802ccaaf3fe61cf4dc403e

-- 
View it on GitLab: https://gitlab.com/lvmteam/lvm2/-/commit/0e8c631f5e58473d7f802ccaaf3fe61cf4dc403e
You're receiving this email because of your account on gitlab.com.

--
lvm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/lvm-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.