Skip to content

Commit 4b87cfc

Browse files
authored
Merge pull request neutrinolabs#2831 from firewave/wdoc
mitigated `-Wdocumentation` and `-Wdocumentation-unknown-command` Clang compiler warnings
2 parents 0bf0942 + 7583e19 commit 4b87cfc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+95
-152
lines changed

common/list.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ split_string_append_fragment(const char **start, const char *end,
117117
*
118118
* @param str String to split.
119119
* @param character Character used as the delimiter between strings.
120-
* @param start_index Index to start on the source list (zero based)
121120
*
122121
* @result 0 if a memory allocation failure occurred.
123122
*

common/log.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ internal_log_file_open(const char *fname)
8484
/**
8585
*
8686
* @brief Converts xrdp log level to syslog logging level
87-
* @param xrdp logging level
87+
* @param lvl logging level
8888
* @return syslog equivalent logging level
8989
*
9090
*/
@@ -114,7 +114,6 @@ internal_log_xrdp2syslog(const enum logLevels lvl)
114114
* @brief Converts xrdp log levels to textual logging levels
115115
* @param lvl logging level
116116
* @param str pointer to a string, must be allocated before
117-
* @return The log string in str pointer.
118117
*
119118
*/
120119
void
@@ -232,8 +231,6 @@ internal_log_end(struct log_config *l_cfg)
232231

233232
/**
234233
* Converts a string representing the log level to a value
235-
* @param buf
236-
* @return
237234
*/
238235
enum logLevels
239236
internal_log_text2level(const char *buf)
@@ -828,8 +825,7 @@ log_start_from_param(const struct log_config *src_log_config)
828825
/**
829826
* This function initialize the log facilities according to the configuration
830827
* file, that is described by the in parameter.
831-
* @param iniFile
832-
* @param applicationName, the name that is used in the log for the running application
828+
* @param applicationName the name that is used in the log for the running application
833829
* @return 0 on success
834830
*/
835831
enum logReturns
@@ -873,7 +869,6 @@ log_start(const char *iniFile, const char *applicationName,
873869

874870
/**
875871
* Function that terminates all logging
876-
* @return
877872
*/
878873
enum logReturns
879874
log_end(void)
@@ -1121,7 +1116,6 @@ internal_log_message(const enum logLevels lvl,
11211116

11221117
/**
11231118
* Return the configured log file name
1124-
* @return
11251119
*/
11261120
char *
11271121
getLogFile(char *replybuf, int bufsize)
@@ -1147,7 +1141,6 @@ getLogFile(char *replybuf, int bufsize)
11471141

11481142
/**
11491143
* Returns formatted datetime for log
1150-
* @return
11511144
*/
11521145
char *
11531146
getFormattedDateTime(char *replybuf, int bufsize)

common/log.h

Lines changed: 24 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ struct log_config
224224
*
225225
* @brief Starts the logging subsystem
226226
* @param l_cfg logging system configuration
227-
* @return
228227
*
229228
*/
230229
enum logReturns
@@ -241,7 +240,7 @@ internal_log_end(struct log_config *l_cfg);
241240

242241
/**
243242
* Converts a log level to a string
244-
* @param lvl, the loglevel
243+
* @param lvl the loglevel
245244
* @param str pointer where the string will be stored.
246245
*/
247246
void
@@ -250,7 +249,7 @@ internal_log_lvl2str(const enum logLevels lvl, char *str);
250249
/**
251250
*
252251
* @brief Converts a string to a log level
253-
* @param s The string to convert
252+
* @param buf The string to convert
254253
* @return The corresponding level or LOG_LEVEL_DEBUG if error
255254
*
256255
*/
@@ -273,12 +272,11 @@ internal_log_config_dump(struct log_config *config);
273272

274273
/**
275274
* the log function that all files use to log an event.
276-
* @param lvl, the loglevel
277-
* @param override_destination_level, if true then the destination log level is not used
278-
* @param override_log_level, the loglevel instead of the destination log level if override_destination_level is true
279-
* @param msg, the logtext.
280-
* @param ap, the values for the message format arguments
281-
* @return
275+
* @param lvl the loglevel
276+
* @param override_destination_level if true then the destination log level is not used
277+
* @param override_log_level the loglevel instead of the destination log level if override_destination_level is true
278+
* @param msg the logtext.
279+
* @param ap the values for the message format arguments
282280
*/
283281
enum logReturns
284282
internal_log_message(const enum logLevels lvl,
@@ -288,9 +286,9 @@ internal_log_message(const enum logLevels lvl,
288286
va_list ap);
289287

290288
/**
291-
* @param log_level, the log level
292-
* @param override_destination_level, if true then the destination log level is ignored.
293-
* @param override_log_level, the log level to use instead of the destination log level
289+
* @param log_level the log level
290+
* @param override_destination_level if true then the destination log level is ignored.
291+
* @param override_log_level the log level to use instead of the destination log level
294292
* if override_destination_level is true
295293
* @return true if at least one log destination will accept a message logged at the given level.
296294
*/
@@ -300,9 +298,9 @@ internal_log_is_enabled_for_level(const enum logLevels log_level,
300298
const enum logLevels override_log_level);
301299

302300
/**
303-
* @param function_name, the function name (typically the __func__ macro)
304-
* @param file_name, the file name (typically the __FILE__ macro)
305-
* @param[out] log_level_return, the log level to use instead of the destination log level
301+
* @param function_name the function name (typically the __func__ macro)
302+
* @param file_name the file name (typically the __FILE__ macro)
303+
* @param[out] log_level_return the log level to use instead of the destination log level
306304
* @return true if the logger location overrides the destination log levels
307305
*/
308306
bool_t
@@ -316,7 +314,6 @@ internal_log_location_overrides_level(const char *function_name,
316314
/**
317315
* This function initialize the log facilities according to the configuration
318316
* file, that is described by the in parameter.
319-
* @param iniFile
320317
* @param applicationName the name that is used in the log for the running
321318
* application
322319
* @param flags Flags to affect the operation of the call
@@ -328,8 +325,6 @@ log_start(const char *iniFile, const char *applicationName,
328325

329326
/**
330327
* An alternative log_start where the caller gives the params directly.
331-
* @param config
332-
* @return
333328
*
334329
* @post to avoid memory leaks, the config argument must be free'ed using
335330
* `log_config_free()`
@@ -344,8 +339,8 @@ log_start_from_param(const struct log_config *src_log_config);
344339
* The config can be customised by the caller before calling
345340
* log_start_from_param()
346341
*
347-
* @param Default log level
348-
* @param Log level name, or NULL. This can be used to provide an
342+
* @param lvl log level
343+
* @param override_name level name, or NULL. This can be used to provide an
349344
* override to the default log level, by environment variable or
350345
* argument.
351346
*
@@ -357,10 +352,8 @@ log_config_init_for_console(enum logLevels lvl, const char *override_name);
357352
/**
358353
* Read configuration from a file and store the values in the returned
359354
* log_config.
360-
* @param file
361-
* @param applicationName, the application name used in the log events.
362-
* @param section_prefix, prefix for the logging sections to parse
363-
* @return
355+
* @param applicationName the application name used in the log events.
356+
* @param section_prefix prefix for the logging sections to parse
364357
*/
365358
struct log_config *
366359
log_config_init_from_config(const char *iniFilename,
@@ -375,7 +368,6 @@ log_config_free(struct log_config *config);
375368

376369
/**
377370
* Function that terminates all logging
378-
* @return
379371
*/
380372
enum logReturns
381373
log_end(void);
@@ -385,10 +377,8 @@ log_end(void);
385377
*
386378
* Please prefer to use the LOG and LOG_DEVEL macros instead of this function directly.
387379
*
388-
* @param lvl, the loglevel
389-
* @param msg, the logtext.
390-
* @param ...
391-
* @return
380+
* @param lvl the loglevel
381+
* @param msg the logtext.
392382
*/
393383
enum logReturns
394384
log_message(const enum logLevels lvl, const char *msg, ...) printflike(2, 3);
@@ -405,13 +395,11 @@ log_hexdump(const enum logLevels log_level,
405395
*
406396
* Please prefer to use the LOG and LOG_DEVEL macros instead of this function directly.
407397
*
408-
* @param function_name, the function name (typically the __func__ macro)
409-
* @param file_name, the file name (typically the __FILE__ macro)
410-
* @param line_number, the line number in the file (typically the __LINE__ macro)
411-
* @param lvl, the loglevel
412-
* @param msg, the logtext.
413-
* @param ...
414-
* @return
398+
* @param function_name the function name (typically the __func__ macro)
399+
* @param file_name the file name (typically the __FILE__ macro)
400+
* @param line_number the line number in the file (typically the __LINE__ macro)
401+
* @param lvl the loglevel
402+
* @param msg the logtext.
415403
*/
416404
enum logReturns
417405
log_message_with_location(const char *function_name,
@@ -434,13 +422,11 @@ log_hexdump_with_location(const char *function_name,
434422
* This function returns the configured file name for the logfile
435423
* @param replybuf the buffer where the reply is stored
436424
* @param bufsize how big is the reply buffer.
437-
* @return
438425
*/
439426
char *getLogFile(char *replybuf, int bufsize);
440427

441428
/**
442429
* Returns formatted datetime for log
443-
* @return
444430
*/
445431
char *getFormattedDateTime(char *replybuf, int bufsize);
446432

common/os_calls.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ int g_sck_select(int sck1, int sck2);
163163
* @param sck File descriptor for peer
164164
* @param ip buffer to write IP address to
165165
* @param bytes Size of ip buffer. Should be at least MAX_IP_ADDRSTRLEN
166-
* @param[out] portptr Optional variable to receive the port number
166+
* @param[out] port Optional variable to receive the port number
167167
* @return Pointer to IP for convenience
168168
*
169169
* If the peer has no IP address (for example, it is a Unix Domain Socket),
@@ -214,7 +214,7 @@ int g_delete_wait_obj(tintptr obj);
214214
* @param read_objs Array of read objects
215215
* @param rcount Number of elements in read_objs
216216
* @param write_objs Array of write objects
217-
* @param rcount Number of elements in write_objs
217+
* @param wcount Number of elements in write_objs
218218
* @param mstimeout Timeout in milliseconds. < 0 means an infinite timeout.
219219
*
220220
* @return 0 for success. The objects will need to be polled to
@@ -503,7 +503,7 @@ g_malloc_nofail(size_t size);
503503

504504
/** Allocate memory with error-checking
505505
*
506-
* @param Number of elements to allocate
506+
* @param nmemb Number of elements to allocate
507507
* @param size Size of each element
508508
* @return Allocated memory
509509
*

common/string_calls.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ g_bytes_to_hexdump(const char *src, int len);
192192
/**
193193
* Extracts the display number from an X11 display string
194194
*
195-
* @param Display string (i.e. g_getenv("DISPLAY"))
195+
* @param display_text Display string (i.e. g_getenv("DISPLAY"))
196196
*
197197
* @result <0 if the string could not be parsed, or >=0 for a display number
198198
*/
@@ -270,7 +270,6 @@ g_bitmask_to_charstr(int bitmask, const struct bitmask_char bitdefs[],
270270
*
271271
* @param str Input string
272272
* @param bitdefs Array mapping tokens to bitmask values
273-
* @param delim Delimiter for tokens in str
274273
* @param[out] unrecognised Buffer for any unrecognised tokens
275274
* @param unrecognised_len Length of unrecognised including '\0';
276275
* @return bitmask value for recognised tokens

common/timers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ timers_oneshot_get_remaining(struct timers_oneshot *timer,
6262
* Variant of timers_oneshot_get_remaining() for g_obj_wait()
6363
* @param timer pointer to timer (or NULL)
6464
* @param now Value of g_get_elapsed_ms()
65-
* @param[in,out] poll timeout
65+
* @param[in,out] timeout timeout
6666
*
6767
* Use this to update a timeout passed to g_obj_wait() (or poll()). The
6868
* timeout is updated if the timer will fire before the current timeout.

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ case "$with_freetype2" in
350350
fi
351351

352352
if test -f $with_freetype2/include/freetype2/ft2build.h; then
353-
FREETYPE2_CFLAGS="-I $with_freetype2/include/freetype2"
353+
FREETYPE2_CFLAGS="-isystem $with_freetype2/include/freetype2"
354354
else
355355
AC_MSG_RESULT([no])
356356
AC_MSG_ERROR([Can't find $with_freetype2/include/freetype2/ft2build.h])

fontutils/dumpfv1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ struct program_args
5757
* Parses the program args
5858
*
5959
* @param argc Passed to main
60-
* @param @argv Passed to main
60+
* @param argv Passed to main
6161
* @param pa program_pargs structure for resulting values
6262
* @return !=0 for success
6363
*/

genkeymap/genkeymap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ output_setxkbmap_comment(FILE *outf, const struct kbd_info *kbd_info)
239239
* Output a section of the keymap file
240240
* @param outf Output file
241241
* @param dpy X display
242-
* @param section name Section name (e.g. 'shift')
242+
* @param section_name name Section name (e.g. 'shift')
243243
* @param event_state Modifier state needed for XKeyPressedEvent
244244
*/
245245
static void
@@ -323,7 +323,7 @@ output_file_section(FILE *outf,
323323
* support this key.
324324
*
325325
* @param dpy X display
326-
* @reurn boolean
326+
* @return boolean
327327
*/
328328
static int
329329
is_caps_lock_supported(Display *dpy)

libipm/libipm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ libipm_msg_out_init(struct trans *trans, unsigned short msgno,
154154
*
155155
* @param trans libipm transport
156156
* @param format a description of any arguments to add to the buffer.
157-
* @param != 0 if an error occurs
157+
* @return != 0 if an error occurs
158158
*
159159
* The format string is followed immediately by the arguments it
160160
* describes. The format string may contain these characters (from the
@@ -299,7 +299,7 @@ libipm_msg_in_peek_type(struct trans *trans);
299299
*
300300
* @param trans libipm transport
301301
* @param format a description of the arguments to read from the buffer.
302-
* @param != 0 if an error occurs
302+
* @return != 0 if an error occurs
303303
*
304304
* The format string is followed immediately by the arguments it
305305
* describes. The format string may contain these characters (from the

0 commit comments

Comments
 (0)