From df594ee430167474aa8da3182729985796b9bf2a Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sun, 1 Sep 2024 20:59:42 -0400 Subject: [PATCH] Tests: Fix ll scan test. --- include/verilated_vpi.cpp | 5 +++-- test_regress/t/t_dist_portability.pl | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/verilated_vpi.cpp b/include/verilated_vpi.cpp index 337607008..842f780d0 100644 --- a/include/verilated_vpi.cpp +++ b/include/verilated_vpi.cpp @@ -2475,7 +2475,7 @@ void vl_get_value(const VerilatedVar* varp, void* varDatap, p_vpi_value valuep, vl_strprintf(t_outDynamicStr, "%u", static_cast(*(reinterpret_cast(varDatap)))); } else if (varp->vltype() == VLVT_UINT64) { - vl_strprintf(t_outDynamicStr, "%llu", + vl_strprintf(t_outDynamicStr, "%llu", // lintok-format-ll static_cast(*(reinterpret_cast(varDatap)))); } valuep->value.str = const_cast(t_outDynamicStr.c_str()); @@ -2697,7 +2697,8 @@ vpiHandle vpi_put_value(vpiHandle object, p_vpi_value valuep, p_vpi_time /*time_ } else if (valuep->format == vpiDecStrVal) { char remainder[16]; unsigned long long val; - const int success = std::sscanf(valuep->value.str, "%30llu%15s", &val, remainder); + const int success = std::sscanf(valuep->value.str, "%30llu%15s", // lintok-format-ll + &val, remainder); if (success < 1) { VL_VPI_ERROR_(__FILE__, __LINE__, "%s: Parsing failed for '%s' as value %s for %s", __func__, valuep->value.str, diff --git a/test_regress/t/t_dist_portability.pl b/test_regress/t/t_dist_portability.pl index c9db4eb9a..7d1ef53b3 100755 --- a/test_regress/t/t_dist_portability.pl +++ b/test_regress/t/t_dist_portability.pl @@ -34,7 +34,7 @@ sub printfll { my %names; foreach my $line (split /\n/, $grep) { next if $line !~ /%[a-z0-9]*ll/; - next if $line !~ /\blong\S+long\b/; # Assume a cast + next if $line =~ /lintok-format-ll/; print "$line\n"; if ($line =~ /^([^:]+)/) { $names{$1} = 1;