mirror of
https://github.com/openvswitch/ovs
synced 2025-10-15 14:17:18 +00:00
Clean-up compiler warnings about ignoring return values
Some systems complain when certain functions' return values are not checked. This commit fixes those warnings. Creating ignore() function suggested by Ben Pfaff.
This commit is contained in:
@@ -383,3 +383,9 @@ dir_name(const char *file_name)
|
||||
return xmemdup0(file_name, len);
|
||||
}
|
||||
}
|
||||
|
||||
/* Pass a value to this function if it is marked with
|
||||
* __attribute__((warn_unused_result)) and you genuinely want to ignore
|
||||
* its return value. (Note that every scalar type can be implicitly
|
||||
* converted to bool.) */
|
||||
void ignore(bool x UNUSED) { }
|
||||
|
Reference in New Issue
Block a user