From b151b5297b574253e122014a40955d53af12749c Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Tue, 17 Feb 2015 15:29:59 +0100 Subject: [PATCH] Fix doxygen warnings Make shure parameter descriptions in doc strings match the functions --- build/files.c | 9 +++++---- build/parsePrep.c | 4 ++-- build/rpmfc.c | 1 - lib/cpio.h | 5 +++-- lib/depends.c | 1 + lib/formats.c | 3 ++- lib/fprint.c | 2 +- lib/fsm.c | 5 +++-- lib/fsm.h | 4 ++-- lib/header.c | 1 - lib/header.h | 2 +- lib/headerutil.c | 2 +- lib/misc.h | 2 +- lib/order.c | 1 + lib/rpmal.h | 1 + lib/rpmarchive.h | 8 ++++---- lib/rpmdb_internal.h | 2 ++ lib/rpmds.h | 2 +- lib/rpmfi.h | 2 ++ lib/rpmfiles.h | 14 ++++++++------ lib/rpmplugins.h | 4 ++-- lib/signature.h | 1 + lib/tagexts.c | 11 +++++++++++ lib/transaction.c | 12 +++++++----- rpmio/macro.c | 4 +++- 25 files changed, 65 insertions(+), 38 deletions(-) diff --git a/build/files.c b/build/files.c index 47ebef74a6..f737b70f11 100644 --- a/build/files.c +++ b/build/files.c @@ -429,6 +429,7 @@ static rpmRC parseForDev(char * buf, FileEntry cur) /** * Parse %attr and %defattr from file manifest. + * @param pool string pool * @param buf current spec file line * @param def parse for %defattr or %attr? * @param entry file entry data (current / default) @@ -862,7 +863,7 @@ static int isHardLink(FileListRec flp, FileListRec tlp) /** * Verify that file attributes scope over hardlinks correctly. * If partial hardlink sets are possible, then add tracking dependency. - * @param fl package file records + * @param files package file records * @return 1 if partial hardlink sets can exist, 0 otherwise. */ static int checkHardLinks(FileRecords files) @@ -901,9 +902,8 @@ static int seenHardLink(FileRecords files, FileListRec flp, rpm_ino_t *fileid) * @todo Should directories have %doc/%config attributes? (#14531) * @todo Remove RPMTAG_OLDFILENAMES, add dirname/basename instead. * @param fl package file tree walk data - * @retval *fip file info for package - * @param h - * @param isSrc + * @param pkg (sub) package + * @param isSrc pass 1 for source packages 0 otherwise */ static void genCpioListAndHeader(FileList fl, Package pkg, int isSrc) { @@ -2019,6 +2019,7 @@ rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags) /** * Check packaged file list against what's in the build root. + * @param buildRoot path of build root * @param fileList packaged file list * @return -1 if skipped, 0 on OK, 1 on error */ diff --git a/build/parsePrep.c b/build/parsePrep.c index f0f74addd8..12ef0c8d86 100644 --- a/build/parsePrep.c +++ b/build/parsePrep.c @@ -378,8 +378,8 @@ static int doSetupMacro(rpmSpec spec, const char *line) /** * Parse %patch line. * This supports too many crazy syntaxes: - * - %patchN is equal to %patch -P - * - -P -P... can be used to apply several patch on a single line + * - %patchN is equal to %patch -P\ + * - -P\ -P\... can be used to apply several patch on a single line * - Any trailing arguments are treated as patch numbers * - Any combination of the above, except unless at least one -P is specified, * %patch is treated as %patch -P0 so that "%patch 1" is actually diff --git a/build/rpmfc.c b/build/rpmfc.c index 552dfa655b..7565b189bc 100644 --- a/build/rpmfc.c +++ b/build/rpmfc.c @@ -482,7 +482,6 @@ static const char *parseDep(char **depav, int depac, * @param ix file index * @param nsdep class name for interpreter (e.g. "perl") * @param depname "provides" or "requires" - * @param depsp fc->provides or fc->requires * @param dsContext RPMSENSE_FIND_PROVIDES or RPMSENSE_FIND_REQUIRES * @param tagN RPMTAG_PROVIDENAME or RPMTAG_REQUIRENAME * @return 0 on success diff --git a/lib/cpio.h b/lib/cpio.h index 8bd44119cd..b33b5fc135 100644 --- a/lib/cpio.h +++ b/lib/cpio.h @@ -34,8 +34,9 @@ rpmcpio_t rpmcpioFree(rpmcpio_t cpio); /** * Write cpio header. - * @retval fsm file path and stat info - * @param st + * @param cpio cpio archive + * @param path file name + * @param st stat struct with meta data * @return 0 on success */ RPM_GNUC_INTERNAL diff --git a/lib/depends.c b/lib/depends.c index 00905a0dd0..874eaac218 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -594,6 +594,7 @@ static int rpmdbProvides(rpmts ts, depCache dcache, rpmds dep) /** * Check dep for an unsatisfied dependency. * @param ts transaction set + * @param dcache dependency cache * @param dep dependency * @return 0 if satisfied, 1 if not satisfied */ diff --git a/lib/formats.c b/lib/formats.c index 653f43d45a..e3626ed620 100644 --- a/lib/formats.c +++ b/lib/formats.c @@ -90,7 +90,8 @@ static char * hexFormat(rpmtd td) } /** - * @param td tag data container + * @param td tag data container + * @param strftimeFormat format string * @return formatted string */ static char * realDateFormat(rpmtd td, const char * strftimeFormat) diff --git a/lib/fprint.c b/lib/fprint.c index 9274dcfdca..65eaeec66e 100644 --- a/lib/fprint.c +++ b/lib/fprint.c @@ -251,7 +251,7 @@ int fpLookup(fingerPrintCache cache, /** * Return hash value for a finger print. * Hash based on dev and inode only! - * @param key pointer to finger print entry + * @param fp pointer to finger print entry * @return hash value */ static unsigned int fpHashFunction(const fingerPrint * fp) diff --git a/lib/fsm.c b/lib/fsm.c index 7ae4747a28..42ec991523 100644 --- a/lib/fsm.c +++ b/lib/fsm.c @@ -67,7 +67,7 @@ typedef struct dnli_s { /** \ingroup payload * Destroy directory name iterator. - * @param a directory name iterator + * @param dnli directory name iterator * @retval NULL always */ static DNLI_t dnlFreeIterator(DNLI_t dnli) @@ -371,7 +371,8 @@ static int fsmMknod(const char *path, mode_t mode, dev_t dev) /** * Create (if necessary) directories not explicitly included in package. - * @param dnli file state machine data + * @param files file data + * @param fs file states * @param plugins rpm plugins handle * @return 0 on success */ diff --git a/lib/fsm.h b/lib/fsm.h index 301ed8b8d8..7a75caf5ab 100644 --- a/lib/fsm.h +++ b/lib/fsm.h @@ -17,9 +17,9 @@ typedef struct rpmpsm_s * rpmpsm; /** * Execute a file actions for package * @param ts transaction set - * @param fi transaction element file info + * @param te transaction set element + * @param files transaction element file info * @param psm owner psm (or NULL) - * @retval archiveSize pointer to archive size * @retval failedFile pointer to first file name that failed (malloced) * @return 0 on success */ diff --git a/lib/header.c b/lib/header.c index 8a0f4beacc..d497a3ae26 100644 --- a/lib/header.c +++ b/lib/header.c @@ -1059,7 +1059,6 @@ int headerIsEntry(Header h, rpmTagVal tag) * @todo Permit retrieval of regions other than HEADER_IMUTABLE. * @param entry header entry * @param td tag data container - * @param minMem string pointers refer to header memory? * @param flags flags to control memory allocation * @return 1 on success, otherwise error. */ diff --git a/lib/header.h b/lib/header.h index ddaba4f686..a6bd625c79 100644 --- a/lib/header.h +++ b/lib/header.h @@ -245,9 +245,9 @@ int headerPut(Header h, rpmtd td, headerPutFlags flags); * @return 1 on success, 0 on failure * */ +int headerPutBin(Header h, rpmTagVal tag, const uint8_t *val, rpm_count_t size); int headerPutString(Header h, rpmTagVal tag, const char *val); int headerPutStringArray(Header h, rpmTagVal tag, const char **val, rpm_count_t size); -int headerPutBin(Header h, rpmTagVal tag, const uint8_t *val, rpm_count_t size); int headerPutChar(Header h, rpmTagVal tag, const char *val, rpm_count_t size); int headerPutUint8(Header h, rpmTagVal tag, const uint8_t *val, rpm_count_t size); int headerPutUint16(Header h, rpmTagVal tag, const uint16_t *val, rpm_count_t size); diff --git a/lib/headerutil.c b/lib/headerutil.c index a9f1221eb1..92c29a8b2f 100644 --- a/lib/headerutil.c +++ b/lib/headerutil.c @@ -1,5 +1,5 @@ /** \ingroup rpmdb - * \file lib/hdrNVR.c + * \file lib/headerutil.c */ #include "system.h" diff --git a/lib/misc.h b/lib/misc.h index c1b77c4d5c..c519afb8e2 100644 --- a/lib/misc.h +++ b/lib/misc.h @@ -43,7 +43,7 @@ int headerFindSpec(Header h); /** * Relocate files in header. * @todo multilib file dispositions need to be checked. - * @param relocations relocations + * @param relocs relocations * @param numRelocations number of relocations * @param fs file state set * @param h package header to relocate diff --git a/lib/order.c b/lib/order.c index ca8b56282e..d3c7dcf203 100644 --- a/lib/order.c +++ b/lib/order.c @@ -134,6 +134,7 @@ static inline int addSingleRelation(rpmte p, /** * Record next "q <- p" relation (i.e. "p" requires "q"). * @param ts transaction set + * @param al packages list * @param p predecessor (i.e. package that "Requires: q") * @param requires relation * @return 0 always diff --git a/lib/rpmal.h b/lib/rpmal.h index 772fb66c68..3c6a833d3d 100644 --- a/lib/rpmal.h +++ b/lib/rpmal.h @@ -73,6 +73,7 @@ rpmte * rpmalAllSatisfiesDepend(const rpmal al, const rpmds ds); /** * Lookup best provider for a dependency in the available list * @param al available list + * @param te transaction element * @param ds dependency set * @return best provider for the dependency, NULL if none */ diff --git a/lib/rpmarchive.h b/lib/rpmarchive.h index 85079ca106..0627cb45c4 100644 --- a/lib/rpmarchive.h +++ b/lib/rpmarchive.h @@ -66,7 +66,7 @@ char * rpmfileStrerror(int rc); * rpmfiArchiveClose() to get the trailer written. * rpmfiSetFX() is not supported for this type of iterator. * @param fd file - * @param fi file info + * @param files file info * @return new rpmfi */ rpmfi rpmfiNewArchiveWriter(FD_t fd, rpmfiles files); @@ -78,7 +78,7 @@ rpmfi rpmfiNewArchiveWriter(FD_t fd, rpmfiles files); * rpmfiArchiveReadToFile() when they are visited with rpmfiNext(). * rpmfiSetFX() is not supported for this type of iterator. * @param fd file - * @param fi file info + * @param files file info * @param itype how to handle hard links. See rpmFileIter. * @return new rpmfi */ @@ -102,7 +102,7 @@ rpm_loff_t rpmfiArchiveTell(rpmfi fi); * Write content into current file in archive * @param fi file info * @param buf pointer to content - * @prama size number of bytes to write + * @param size number of bytes to write * @return bytes actually written */ size_t rpmfiArchiveWrite(rpmfi fi, const void * buf, size_t size); @@ -119,7 +119,7 @@ int rpmfiArchiveWriteFile(rpmfi fi, FD_t fd); * Read content from current file in archive * @param fi file info * @param buf pointer to buffer - * @prama size number of bytes to read + * @param size number of bytes to read * @return bytes actually read */ size_t rpmfiArchiveRead(rpmfi fi, void * buf, size_t size); diff --git a/lib/rpmdb_internal.h b/lib/rpmdb_internal.h index 282c4e9e81..92848ab376 100644 --- a/lib/rpmdb_internal.h +++ b/lib/rpmdb_internal.h @@ -133,6 +133,7 @@ void rpmdbUniqIterator(rpmdbMatchIterator mi); * all packages that header numbers are in hdrNums. * @param mi rpm database iterator * @param hdrNums hash of package numbers + * @param neg mode * return 0 on success, 1 on failure (bad args) */ int rpmdbFilterIterator(rpmdbMatchIterator mi, packageHash hdrNums, int neg); @@ -195,6 +196,7 @@ void rpmdbSetIteratorIndex(rpmdbMatchIterator mi, unsigned int ix); /** \ingroup rpmdb * Return offset of package with given index. * @param mi rpm database iterator + * @param ix index * @return package offset */ RPM_GNUC_INTERNAL diff --git a/lib/rpmds.h b/lib/rpmds.h index 9efb26f571..2826703cc0 100644 --- a/lib/rpmds.h +++ b/lib/rpmds.h @@ -91,7 +91,7 @@ typedef rpmFlags rpmsenseFlags; /** \ingroup rpmds * Return only those flags allowed for given type of dependencies * @param tagN type of dependency - * @param flags flags + * @param Flags flags * @return flags filtered to allowed bits */ rpmsenseFlags rpmSanitizeDSFlags(rpmTagVal tagN, rpmsenseFlags Flags); diff --git a/lib/rpmfi.h b/lib/rpmfi.h index dd44451e66..1752b711a2 100644 --- a/lib/rpmfi.h +++ b/lib/rpmfi.h @@ -91,6 +91,7 @@ const char * rpmfiFN(rpmfi fi); * The file name may have "." prefixed but is then interpreted as a global * path without the prefixing "." * @param fi file info set iterator + * @param fn file name * @return file index or -1 */ int rpmfiFindFN(rpmfi fi, const char * fn); @@ -121,6 +122,7 @@ const char * rpmfiOFN(rpmfi fi); * in the rpmfi. The file name may have "." prefixed but is then interpreted * as a global path without the prefixing "." * @param fi file info set iterator + * @param fn file name * @return file index or -1 */ int rpmfiFindOFN(rpmfi fi, const char * fn); diff --git a/lib/rpmfiles.h b/lib/rpmfiles.h index 0c785d208c..8a9de31286 100644 --- a/lib/rpmfiles.h +++ b/lib/rpmfiles.h @@ -202,7 +202,8 @@ rpm_count_t rpmfilesDC(rpmfiles fi); * Return file index of the given file name or -1 if file is not in the rpmfi. * The file name may have "." prefixed but is then interpreted as a global * path without the prefixing "." - * @param fi file info set + * @param files file info set + * @param fn file name * @return file index or -1 */ int rpmfilesFindFN(rpmfiles files, const char * fn); @@ -211,7 +212,8 @@ int rpmfilesFindFN(rpmfiles files, const char * fn); * Return file index of the given original file name or -1 if file is not * in the rpmfi. The file name may have "." prefixed but is then interpreted * as a global path without the prefixing "." - * @param fi file info set + * @param files file info set + * @param fn file name * @return file index or -1 */ int rpmfilesFindOFN(rpmfiles files, const char * fn); @@ -227,7 +229,7 @@ int rpmfilesDigestAlgo(rpmfiles fi); /** \ingroup rpmfiles * Return union of all file color bits from file info set. - * @param fi file info set + * @param files file info set * @return color */ rpm_color_t rpmfilesColor(rpmfiles files); @@ -258,7 +260,7 @@ const char * rpmfilesBN(rpmfiles fi, int ix); * you'd catenate the results of rpmfilesDN(f, rpmfilesDI(f, X)) and * rpmfilesBN(f, X). * @param fi file info set - * @param ix directory index + * @param jx directory index * @return directory, NULL on invalid */ const char * rpmfilesDN(rpmfiles fi, int jx); @@ -303,7 +305,7 @@ const char * rpmfilesOBN(rpmfiles fi, int ix); * you'd catenate the results of rpmfilesODN(f, rpmfilesODI(f, X)) and * rpmfilesOBN(f, X). * @param fi file info set - * @param ix directory index + * @param jx directory index * @return directory, NULL on invalid */ const char * rpmfilesODN(rpmfiles fi, int jx); @@ -420,7 +422,7 @@ rpm_mode_t rpmfilesFMode(rpmfiles fi, int ix); * @param fi file info set * @param ix file index * @retval algo digest hash algorithm used (pass NULL to ignore) - * @retval diglen digest hash length (pass NULL to ignore) + * @retval len digest hash length (pass NULL to ignore) * @return file digest, NULL on invalid */ const unsigned char * rpmfilesFDigest(rpmfiles fi, int ix, int *algo, size_t *len); diff --git a/lib/rpmplugins.h b/lib/rpmplugins.h index ecfa68b4a5..39762c3768 100644 --- a/lib/rpmplugins.h +++ b/lib/rpmplugins.h @@ -157,8 +157,8 @@ rpmRC rpmpluginsCallFsmFilePost(rpmPlugins plugins, rpmfi fi, const char* path, * @param plugins plugins structure * @param fi file info iterator (or NULL) * @param path file object current path - * @param path file object destination path - * @param file_mode file object mode + * @param dest file object destination path + * @param mode file object mode * @param op file operation + associated flags * @return RPMRC_OK on success, RPMRC_FAIL otherwise */ diff --git a/lib/signature.h b/lib/signature.h index e2db8fb080..b2c61cad74 100644 --- a/lib/signature.h +++ b/lib/signature.h @@ -63,6 +63,7 @@ int rpmWriteSignature(FD_t fd, Header h); * @param keyring keyring handle * @param sigtd signature tag data container * @param sig signature/pubkey parameters + * @param ctx digest context * @retval result detailed text result of signature verification * (malloc'd) * @return result of signature verification diff --git a/lib/tagexts.c b/lib/tagexts.c index 0d2b1d31d5..cda7e57658 100644 --- a/lib/tagexts.c +++ b/lib/tagexts.c @@ -195,6 +195,7 @@ static int filedepTag(Header h, rpmTag tagN, rpmtd td, headerGetFlags hgflags) * Retrieve trigger info. * @param h header * @retval td tag data container + * @param hgflags header get flags * @return 1 on success */ static int triggercondsTag(Header h, rpmtd td, headerGetFlags hgflags) @@ -265,6 +266,7 @@ static int triggercondsTag(Header h, rpmtd td, headerGetFlags hgflags) * Retrieve trigger type info. * @param h header * @retval td tag data container + * @param hgflags header get flags * @return 1 on success */ static int triggertypeTag(Header h, rpmtd td, headerGetFlags hgflags) @@ -339,6 +341,7 @@ static int filenamesTag(Header h, rpmtd td, headerGetFlags hgflags) * Retrieve original file paths (wrt relocation). * @param h header * @retval td tag data container + * @param hgflags header get flags * @return 1 on success */ static int origfilenamesTag(Header h, rpmtd td, headerGetFlags hgflags) @@ -389,6 +392,7 @@ static char *makeFClass(rpmfi fi) * Retrieve/generate file classes. * @param h header * @retval td tag data container + * @param hgflags header get flags * @return 1 on success */ static int fileclassTag(Header h, rpmtd td, headerGetFlags hgflags) @@ -419,6 +423,7 @@ static int fileclassTag(Header h, rpmtd td, headerGetFlags hgflags) * Retrieve file provides. * @param h header * @retval td tag data container + * @param hgflags header get flags * @return 1 on success */ static int fileprovideTag(Header h, rpmtd td, headerGetFlags hgflags) @@ -430,6 +435,7 @@ static int fileprovideTag(Header h, rpmtd td, headerGetFlags hgflags) * Retrieve file requires. * @param h header * @retval td tag data container + * @param hgflags header get flags * @return 1 on success */ static int filerequireTag(Header h, rpmtd td, headerGetFlags hgflags) @@ -451,6 +457,7 @@ static const char * const _macro_i18ndomains = "%{?_i18ndomains}"; * @param h header * @param tag tag * @retval td tag data container + * @param hgflags header get flags * @return 1 on success */ static int i18nTag(Header h, rpmTag tag, rpmtd td, headerGetFlags hgflags) @@ -515,6 +522,7 @@ static int i18nTag(Header h, rpmTag tag, rpmtd td, headerGetFlags hgflags) * Retrieve summary text. * @param h header * @retval td tag data container + * @param hgflags header get flags * @return 1 on success */ static int summaryTag(Header h, rpmtd td, headerGetFlags hgflags) @@ -526,6 +534,7 @@ static int summaryTag(Header h, rpmtd td, headerGetFlags hgflags) * Retrieve description text. * @param h header * @retval td tag data container + * @param hgflags header get flags * @return 1 on success */ static int descriptionTag(Header h, rpmtd td, headerGetFlags hgflags) @@ -537,6 +546,7 @@ static int descriptionTag(Header h, rpmtd td, headerGetFlags hgflags) * Retrieve group text. * @param h header * @retval td tag data container + * @param hgflags header get flags * @return 1 on success */ static int groupTag(Header h, rpmtd td, headerGetFlags hgflags) @@ -583,6 +593,7 @@ static int get64(Header h, rpmtd td, rpmTag newtag, rpmTag oldtag) * Retrieve file sizes as 64bit regardless of how they're stored. * @param h header * @retval td tag data container + * @param hgflags header get flags * @return 1 on success */ static int longfilesizesTag(Header h, rpmtd td, headerGetFlags hgflags) diff --git a/lib/transaction.c b/lib/transaction.c index 44a515276e..0f39732621 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -379,9 +379,11 @@ static int handleColorConflict(rpmts ts, * @param ts transaction set * @param p current transaction element * @param fi file info set - * @param shared shared file info - * @param sharedCount no. of shared elements - * @param reportConflicts + * @param fx file index + * @param otherHeader header containing the matching file + * @param otherFi matching file info set + * @param ofx matching file index + * @param beingRemoved file being removed (installed otherwise) */ /* XXX only ts->{probs,rpmdb} modified */ static void handleInstInstalledFile(const rpmts ts, rpmte p, rpmfiles fi, int fx, @@ -654,7 +656,6 @@ assert(otherFi != NULL); * @param tspool transaction string pool * @param p current transaction element * @param h installed header - * @param ps problem set */ static void ensureOlder(rpmstrPool tspool, const rpmte p, const Header h) { @@ -746,7 +747,8 @@ static void skipEraseFiles(const rpmts ts, rpmfiles files, rpmfs fs) /** * Skip any files that do not match install policies. * @param ts transaction set - * @param fi file info set + * @param files file info set + * @param fs file states */ static void skipInstallFiles(const rpmts ts, rpmfiles files, rpmfs fs) { diff --git a/rpmio/macro.c b/rpmio/macro.c index 8d9dfe5b17..46e6b874b3 100644 --- a/rpmio/macro.c +++ b/rpmio/macro.c @@ -186,7 +186,7 @@ findEntry(rpmMacroContext mc, const char *name, size_t namelen, size_t *pos) * fgets(3) analogue that reads \ continuations. Last newline always trimmed. * @param buf input buffer * @param size inbut buffer size (bytes) - * @param fd file handle + * @param f file handle * @return buffer, or NULL on end-of-file */ static char * @@ -628,6 +628,7 @@ doUndefine(rpmMacroContext mc, const char * se, size_t slen) /** * Free parsed arguments for parameterized macro. * @param mb macro expansion state + * @param delete */ static void freeArgs(MacroBuf mb, int delete) @@ -914,6 +915,7 @@ doFoo(MacroBuf mb, int negate, const char * f, size_t fn, * The main macro recursion loop. * @param mb macro expansion state * @param src string to expand + * @param slen length of string buffer * @return 0 on success, 1 on failure */ static int