Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-14306 (GitHub Actions) clang-cl 10 reports some warnings: review/fix them
  3. CORE-14309

QueryParameters(): "drivers\storage\class\ramdisk\ramdisk.c(259,26) : warning: comparison 'ULONG' (aka 'unsigned long') > 4294967295 is always false [-Wtautological-constant-compare]"

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: Drivers: Other
    • Labels:
      None

      Description

      QueryParameters()

      Ftr, the 2 * 3 previous cases are consistent.

      This 7th case is warned:

       256     /* Parse maximum view length per disk, cannot be smaller than 16MB */
       257     if (MaximumPerDiskViewLength >= 0x1000000)
       258     {
       259         if (MaxViewLength > 0xFFFFFFFF) MaximumPerDiskViewLength = -1;
       260     }
       261     else
       262     {
       263         MaximumPerDiskViewLength = 0x1000000u;
       264     }
      

      Line 259 is undocumented.
      MaximumPerDiskViewLength grep is set, but never used.

      Options:

      • Remove MaximumPerDiskViewLength.
        Assumed unwanted?
      • Convert this line to a // FIXME.
        As this line is currently useless anyway!
      • Replace it with if (MaximumPerDiskViewLength > MaxViewLength) MaximumPerDiskViewLength = MaxViewLength;.
        Only a guess...

      This code was added as is in r34170 by "ros-arm-bringup".

      While there, add u where they miss, to be consistent.
      Ideally, use some {{#define}}s.

        Attachments

          Activity

            People

            • Assignee:
              bug zilla Bug Zilla
              Reporter:
              Serge Gautherie Serge Gautherie
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: