• E
    build: add syntax check for proper flags use · 761bbb17
    Eric Blake 提交于
    Enforce the recent flags cleanups - we want to use 'unsigned int flags'
    in any of our APIs (except where backwards compatibility is important,
    in the public migration APIs), and that all flags are checked for
    validity (except when there are stub functions that completely
    ignore the flags argument).
    
    There are a few minor tweaks done here to avoid false positives:
    signed arguments passed to open() are renamed oflags, and flags
    arguments that are legitimately ignored are renamed flags_unused.
    
    * cfg.mk (sc_flags_usage): New rule.
    (exclude_file_name_regexp--sc_flags_usage): And a few exemptions.
    (sc_flags_debug): Tweak wording.
    * src/util/iohelper.c (runIO, main): Rename variable.
    * src/util/util.c (virSetInherit): Likewise.
    * src/fdstream.h (virFDStreamOpenFile, virFDStreamCreateFile):
    Likewise.
    * src/fdstream.c (virFDStreamOpenFileInternal)
    (virFDStreamOpenFile, virFDStreamCreateFile): Likewise.
    * src/util/command.c (virExecWithHook) [WIN32]: Likewise.
    * src/util/util.c (virFileOpenAs, virDirCreate) [WIN32]: Likewise.
    * src/locking/lock_manager.c (virLockManagerPluginNew)
    [!HAVE_DLFCN_H]: Likewise.
    * src/locking/lock_driver_nop.c (virLockManagerNopNew)
    (virLockManagerNopAddResource, virLockManagerNopAcquire)
    (virLockManagerNopRelease, virLockManagerNopInquire): Likewise.
    761bbb17
fdstream.h 1.7 KB