]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
tests: Fix specifying constant of double type
authorKhem Raj <raj.khem@gmail.com>
Thu, 3 Oct 2024 00:04:08 +0000 (17:04 -0700)
committerMark Wielaard <mark@klomp.org>
Thu, 3 Oct 2024 08:59:56 +0000 (10:59 +0200)
'd' suffix seems to be not acceptable by clang compiler
Using 'e0' fixes this by keeping value to be same

Fixes
funcretval_test_struct.c:83:27: error: invalid suffix 'd' on floating constant
   83 |   dpoint_t dp = dmkpt (3.0d, 1.0d);
      |                           ^
funcretval_test_struct.c:83:33: error: invalid suffix 'd' on floating constant
   83 |   dpoint_t dp = dmkpt (3.0d, 1.0d);
      |

Signed-off-by: Khem Raj <raj.khem@gmail.com>
tests/funcretval_test_struct.c

index df94bde0a42df65ee2fddc0bb0b2ef42cfdb4773..6bf82f7d0ca562fd09717d326ec0d6249edc72e1 100644 (file)
@@ -80,7 +80,7 @@ main (void)
   div_t d = div (3, 2);
   ldiv_t ld = ldiv (3, 2);
   point_t p = mkpt (3.0f, 1.0f);
-  dpoint_t dp = dmkpt (3.0d, 1.0d);
+  dpoint_t dp = dmkpt (3.0e0, 1.0e0);
 
   return d.q - (int) p.y + ld.q - (int) dp.y;
 }