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

use of logical '&&' with constant operand

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.17.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      the latest report on new defect(s) introduced to Lustre found with Coverity Scan.

        • CID 454269: (CONSTANT_EXPRESSION_RESULT)

      /lustre/osc/osc_cache.c: 2048 in get_read_extents()
      CID 454269: (CONSTANT_EXPRESSION_RESULT)
      The expression "!!ldlm_lock_to_ns(__ext->oe_dlmlock)->ns_dump_stack_on_error && 1 /* D_ERROR & D_ERROR */" is suspicious because it performs a Boolean operation on a constant other than 0 or 1.
      2048 EASSERT(ext->oe_nr_pages <= data.erd_max_pages, ext);

      Some new gcc would report warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]

      Attachments

        Activity

          People

            bobijam Zhenyu Xu
            bobijam Zhenyu Xu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: