../test/libndctl.c:989:2: warning: ISO C90 forbids mixed declarations and code 
[-Wdeclaration-after-statement]
  989 |  unsigned long long expect_table[][2] = {
      |  ^~~~~~~~

...just move the declaration a few lines up.

Signed-off-by: Dan Williams <[email protected]>
---
 test/libndctl.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/test/libndctl.c b/test/libndctl.c
index 24d72b382239..fc651499cc86 100644
--- a/test/libndctl.c
+++ b/test/libndctl.c
@@ -980,12 +980,6 @@ static int check_btt_size(struct ndctl_btt *btt)
        struct ndctl_ctx *ctx = ndctl_btt_get_ctx(btt);
        struct ndctl_test *test = ndctl_get_private_data(ctx);
        struct ndctl_namespace *ndns = ndctl_btt_get_namespace(btt);
-
-       if (!ndns)
-               return -ENXIO;
-
-       ns_size = ndctl_namespace_get_size(ndns);
-       sect_size = ndctl_btt_get_sector_size(btt);
        unsigned long long expect_table[][2] = {
                [0] = {
                        [0] = 0x11b5400,
@@ -1001,6 +995,12 @@ static int check_btt_size(struct ndctl_btt *btt)
                },
        };
 
+       if (!ndns)
+               return -ENXIO;
+
+       ns_size = ndctl_namespace_get_size(ndns);
+       sect_size = ndctl_btt_get_sector_size(btt);
+
        if (sect_size >= SZ_4K)
                sect_select = 1;
        else if (sect_size >= 512)
_______________________________________________
Linux-nvdimm mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to