Re: oversensitive "use of cast expressions as lvalues is deprecated"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> The casted lvalue is ((uint16_t *) src). The increment
> operator needs a proper lvalue.

Thanks, I completely missed that.

> By the way, accessing nonvolatile objects through a volatile
> object pointer is dangerous. It might do what you want, but
> is not guaranteed to.

The user is trying to write a value to a hardware port using an 
outportw macro. The macro takes his port address, an integer, 
and casts it to volatile pointer in the correct block of 
memory. It then writes the data to this pointer. What is 
incorrect with this method?

Cheers,
Shaun

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux