2
0
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:
Justin Pettit
2009-12-14 23:08:10 -08:00
parent c100e025e2
commit 18b9283b98
9 changed files with 18 additions and 10 deletions

View File

@@ -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) { }