Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-8779

llapi_hsm_log_ct_progress incorrect indenting

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Minor
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      Building on Fedora, we get this build error:

      liblustreapi_hsm.c: In function Б─≤llapi_hsm_log_ct_progressБ─≥:
      liblustreapi_hsm.c:432:2: error: this Б─≤ifБ─≥ clause does not guard... [-Werror=misleading-indentation]
        if (progress_type == CT_RUNNING)
        ^~
      liblustreapi_hsm.c:435:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the Б─≤ifБ─≥
         if (rc < 0)
         ^~
      

      The code looks like this:

              if (progress_type == CT_RUNNING)
                      rc = llapi_json_add_item(&json_items, "current_bytes",
                                               LLAPI_JSON_BIGNUM, &current);
                      if (rc < 0)
                              goto err;
      
      

      I guess in that place it does not matter if we fix the indenting ot add extra parenthesis, but something need to be done to avoid confusion.

      Attachments

        Activity

          People

            bzzz Alex Zhuravlev
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: