05-04-2006, 03:57 AM
According to source code below, please kindly help me to clear understanding whether where are the implicitly cast and they will cast to what type?
Warning: Unsuffixed integral literal implicitly cast to another type.
Source code
struct {
unsigned char multiple: 1;
unsigned char event: 1;
unsigned char checksum: 1;
unsigned char conditional: 1;
} flag;
...
void transmit(void)
{
…
if (flag.conditional == 1) { [color=red][b]
Warning: Unsuffixed integral literal implicitly cast to another type.
Source code
struct {
unsigned char multiple: 1;
unsigned char event: 1;
unsigned char checksum: 1;
unsigned char conditional: 1;
} flag;
...
void transmit(void)
{
…
if (flag.conditional == 1) { [color=red][b]
<t></t>