Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12434 Discussions

Any body an idee what #define USE_ARG(x) { x = x; } does?

Altera_Forum
Honored Contributor II
859 Views

Hello, 

i am using a cyclone with a nios system and tse_mac. 

Now unfortunatly i had to port the system from 12.1 to 17, because the modules are damned not reverse compatible! 

But now i have the et_arp.c file whitch is different from my last version in that there is an added line with  

USE_ARG(eth); 

where eth is a char *. 

the definition of USE_ARG: 

#define USE_ARG(x) { x = x; } 

does anybody know what this macro does? 

First I thought, that it is done to not be forced to cast different variables. But normally the compiler would anyway generate an errror?
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
126 Views

Does the function actually use the eth argument? I've seen this kind of macros in some source code where a function doesn't use one of the arguments, to prevent the "unused argument" warning from the compiler.

Reply