qemu-4.1.0/roms/edk2/MdeModulePkg/Universal/Disk/UdfDxe/FileName.c:161: logical fault ?

Bug #1840648 reported by dcb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Invalid
Undecided
Unassigned

Bug Description

qemu-4.1.0/roms/edk2/MdeModulePkg/Universal/Disk/UdfDxe/FileName.c:161:71: warning: Logical disjunction always evaluates to true: EXPR != '\\' || EXPR != '\0'. [incorrectLogicOperator]

Source code is

       if ((*(FileName - 1) != L'\\') && ((*(FileName + 2) != L'\\') ||
                                           (*(FileName + 2) != L'\0'))) {

Maybe better code:

       if ((*(FileName - 1) != L'\\') && ((*(FileName + 2) != L'\\') &&
                                           (*(FileName + 2) != L'\0'))) {

Revision history for this message
Peter Maydell (pmaydell) wrote :

This isn't QEMU code -- it's just the source for third-party ROMs that we ship with QEMU because we also ship the ROM binaries. Please report it to the upstream project.

Changed in qemu:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.