Error: invalid lvalue in assignment

Error: invalid lvalue in assignment

I am trying to compile the micro light example with gcc 4.1.1 on Debian. The only error I get on compilation:

ILibParsers.c:1318: error: invalid lvalue in assignment (char*)x->Reserved -= 1;

What is the preferred solution for this?

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.


Thank you for contacting Intel Software Network Support.

Our experts have responded with this feedback about your issue:

It appears that you are using an older version of the sample code generated by uPnP Device Builder tool. There are two ways to solve this. We recommend the following options, in order of preference:

1. Migrate from UPnP Device Builder to Digital Home Device Code Wizard. The Code Wizard tool replaces many of the original UPnP Authoring tools and will output updated source code files that should not have this compile problem. In addition, it has several new features which might be of interest to your development project. You can find more details at

2. If you are unable to migrate to Code Wizard at this time, you can solve the compile issue by changing your code in the following way:

(char*)x->Reserved -= 1;

x->Reserved = ((char*)x->Reserved) 1;


Gina B.
Intel Software Network Support

Intel is a registered trademark of Intel Corporation or its subsidiaries in the United States and other countries.

*Other names and brands may be claimed as the property of others.

Leave a Comment

Please sign in to add a comment. Not a member? Join today