[Qemu-devel] [Bug 1655708] Re: target/ppc/int_helper.c:2806: strange expression ?
Fix had been committed here: http://git.qemu.org/?p=qemu.git;a=commitdiff;h=365206aeb3d0bb72043d ** Changed in: qemu Status: In Progress => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1655708 Title: target/ppc/int_helper.c:2806: strange expression ? Status in QEMU: Fix Released Bug description: target/ppc/int_helper.c:2806:25: warning: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context] Source code is zone_digit = (i * 2) ? b->u8[BCD_DIG_BYTE(i * 2)] >> 4 : zone_lead; Which I read as zone_digit = (i * 2) ? (b->u8[BCD_DIG_BYTE(i * 2)] >> 4) : zone_lead; so I think the compiler warning is for the i * 2 lhs of the ?. I am not sure what to suggest as a bugfix. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1655708/+subscriptions
[Qemu-devel] [Bug 1655708] Re: target/ppc/int_helper.c:2806: strange expression ?
Patch has been posted to the mailing list: https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg02008.html ** Changed in: qemu Status: New => In Progress -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1655708 Title: target/ppc/int_helper.c:2806: strange expression ? Status in QEMU: In Progress Bug description: target/ppc/int_helper.c:2806:25: warning: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context] Source code is zone_digit = (i * 2) ? b->u8[BCD_DIG_BYTE(i * 2)] >> 4 : zone_lead; Which I read as zone_digit = (i * 2) ? (b->u8[BCD_DIG_BYTE(i * 2)] >> 4) : zone_lead; so I think the compiler warning is for the i * 2 lhs of the ?. I am not sure what to suggest as a bugfix. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1655708/+subscriptions
[Qemu-devel] [Bug 1655708] Re: target/ppc/int_helper.c:2806: strange expression ?
> so it is just as easy to write 'i ? ...' instead of the weirder > '(i * 2) ? ...'. I suspect it is just possible that the i * 2 expression is a typo for something else, perhaps i & 2 or i << 2 or i >> 2 or something else. I don't know the code so I am unable to offer better guidance. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1655708 Title: target/ppc/int_helper.c:2806: strange expression ? Status in QEMU: New Bug description: target/ppc/int_helper.c:2806:25: warning: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context] Source code is zone_digit = (i * 2) ? b->u8[BCD_DIG_BYTE(i * 2)] >> 4 : zone_lead; Which I read as zone_digit = (i * 2) ? (b->u8[BCD_DIG_BYTE(i * 2)] >> 4) : zone_lead; so I think the compiler warning is for the i * 2 lhs of the ?. I am not sure what to suggest as a bugfix. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1655708/+subscriptions
[Qemu-devel] [Bug 1655708] Re: target/ppc/int_helper.c:2806: strange expression ?
** Changed in: qemu Assignee: (unassigned) => Jose R. Ziviani (jrziviani) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1655708 Title: target/ppc/int_helper.c:2806: strange expression ? Status in QEMU: New Bug description: target/ppc/int_helper.c:2806:25: warning: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context] Source code is zone_digit = (i * 2) ? b->u8[BCD_DIG_BYTE(i * 2)] >> 4 : zone_lead; Which I read as zone_digit = (i * 2) ? (b->u8[BCD_DIG_BYTE(i * 2)] >> 4) : zone_lead; so I think the compiler warning is for the i * 2 lhs of the ?. I am not sure what to suggest as a bugfix. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1655708/+subscriptions