From d332993449448348f3e0d8341c0ba4dd936d5805 Mon Sep 17 00:00:00 2001 From: firewave Date: Wed, 18 Oct 2023 00:13:11 +0200 Subject: [PATCH 1/2] enabled and mitigated `-Wdocumentation` and `-Wdocumentation-unknown-command` Clang compiler warnings --- common/list.h | 1 - common/log.c | 11 +----- common/log.h | 62 ++++++++++++------------------- common/os_calls.h | 4 +- common/string_calls.h | 3 +- configure.ac | 1 + fontutils/dumpfv1.c | 2 +- libipm/libipm.h | 4 +- libipm/libipm_send.c | 1 - libipm/scp_application_types.h | 2 +- libxrdp/xrdp_iso.c | 1 - libxrdp/xrdp_mcs.c | 2 - libxrdp/xrdp_rdp.c | 1 - sesman/chansrv/chansrv_config.c | 8 ++-- sesman/chansrv/chansrv_config.h | 4 +- sesman/chansrv/chansrv_fuse.c | 2 +- sesman/chansrv/clipboard_common.h | 2 +- sesman/chansrv/clipboard_file.h | 2 +- sesman/chansrv/devredir.c | 1 - sesman/chansrv/smartcard.c | 18 --------- sesman/eicp_process.h | 1 - sesman/ercp_process.h | 1 - sesman/libsesman/sesman_auth.h | 12 +++--- sesman/libsesman/sesman_config.c | 2 +- sesman/libsesman/sesman_config.h | 6 +-- sesman/pre_session_list.c | 2 +- sesman/pre_session_list.h | 2 +- sesman/sesexec/login_info.c | 2 +- sesman/sesexec/login_info.h | 1 - sesman/sesexec/session.c | 6 +-- sesman/sesexec/session.h | 2 +- sesman/sesman.c | 2 +- sesman/session_list.h | 2 +- sesman/tools/authtest.c | 4 +- sesman/tools/sesrun.c | 4 +- vnc/vnc.c | 3 +- vnc/vnc_clip.c | 2 +- vnc/vnc_clip.h | 2 +- xrdp/xrdp.c | 6 +-- xrdp/xrdp_bitmap_load.c | 10 ++--- 40 files changed, 76 insertions(+), 128 deletions(-) diff --git a/common/list.h b/common/list.h index c330fa8a87..939dcff3f9 100644 --- a/common/list.h +++ b/common/list.h @@ -104,7 +104,6 @@ list_dump_items(struct list *self); * * @param str String to split. * @param character Character used as the delimiter between strings. - * @param start_index Index to start on the source list (zero based) * * @result 0 if a memory allocation failure occurred. * diff --git a/common/log.c b/common/log.c index fe8bbcb55c..c016caf01d 100644 --- a/common/log.c +++ b/common/log.c @@ -84,7 +84,7 @@ internal_log_file_open(const char *fname) /** * * @brief Converts xrdp log level to syslog logging level - * @param xrdp logging level + * @param lvl logging level * @return syslog equivalent logging level * */ @@ -114,7 +114,6 @@ internal_log_xrdp2syslog(const enum logLevels lvl) * @brief Converts xrdp log levels to textual logging levels * @param lvl logging level * @param str pointer to a string, must be allocated before - * @return The log string in str pointer. * */ void @@ -232,8 +231,6 @@ internal_log_end(struct log_config *l_cfg) /** * Converts a string representing the log level to a value - * @param buf - * @return */ enum logLevels internal_log_text2level(const char *buf) @@ -828,8 +825,7 @@ log_start_from_param(const struct log_config *src_log_config) /** * This function initialize the log facilities according to the configuration * file, that is described by the in parameter. - * @param iniFile - * @param applicationName, the name that is used in the log for the running application + * @param applicationName the name that is used in the log for the running application * @return 0 on success */ enum logReturns @@ -873,7 +869,6 @@ log_start(const char *iniFile, const char *applicationName, /** * Function that terminates all logging - * @return */ enum logReturns log_end(void) @@ -1121,7 +1116,6 @@ internal_log_message(const enum logLevels lvl, /** * Return the configured log file name - * @return */ char * getLogFile(char *replybuf, int bufsize) @@ -1147,7 +1141,6 @@ getLogFile(char *replybuf, int bufsize) /** * Returns formatted datetime for log - * @return */ char * getFormattedDateTime(char *replybuf, int bufsize) diff --git a/common/log.h b/common/log.h index 32906af100..fd5b2d029e 100644 --- a/common/log.h +++ b/common/log.h @@ -224,7 +224,6 @@ struct log_config * * @brief Starts the logging subsystem * @param l_cfg logging system configuration - * @return * */ enum logReturns @@ -241,7 +240,7 @@ internal_log_end(struct log_config *l_cfg); /** * Converts a log level to a string - * @param lvl, the loglevel + * @param lvl the loglevel * @param str pointer where the string will be stored. */ void @@ -250,7 +249,7 @@ internal_log_lvl2str(const enum logLevels lvl, char *str); /** * * @brief Converts a string to a log level - * @param s The string to convert + * @param buf The string to convert * @return The corresponding level or LOG_LEVEL_DEBUG if error * */ @@ -273,12 +272,11 @@ internal_log_config_dump(struct log_config *config); /** * the log function that all files use to log an event. - * @param lvl, the loglevel - * @param override_destination_level, if true then the destination log level is not used - * @param override_log_level, the loglevel instead of the destination log level if override_destination_level is true - * @param msg, the logtext. - * @param ap, the values for the message format arguments - * @return + * @param lvl the loglevel + * @param override_destination_level if true then the destination log level is not used + * @param override_log_level the loglevel instead of the destination log level if override_destination_level is true + * @param msg the logtext. + * @param ap the values for the message format arguments */ enum logReturns internal_log_message(const enum logLevels lvl, @@ -288,9 +286,9 @@ internal_log_message(const enum logLevels lvl, va_list ap); /** - * @param log_level, the log level - * @param override_destination_level, if true then the destination log level is ignored. - * @param override_log_level, the log level to use instead of the destination log level + * @param log_level the log level + * @param override_destination_level if true then the destination log level is ignored. + * @param override_log_level the log level to use instead of the destination log level * if override_destination_level is true * @return true if at least one log destination will accept a message logged at the given level. */ @@ -300,9 +298,9 @@ internal_log_is_enabled_for_level(const enum logLevels log_level, const enum logLevels override_log_level); /** - * @param function_name, the function name (typically the __func__ macro) - * @param file_name, the file name (typically the __FILE__ macro) - * @param[out] log_level_return, the log level to use instead of the destination log level + * @param function_name the function name (typically the __func__ macro) + * @param file_name the file name (typically the __FILE__ macro) + * @param[out] log_level_return the log level to use instead of the destination log level * @return true if the logger location overrides the destination log levels */ bool_t @@ -316,7 +314,6 @@ internal_log_location_overrides_level(const char *function_name, /** * This function initialize the log facilities according to the configuration * file, that is described by the in parameter. - * @param iniFile * @param applicationName the name that is used in the log for the running * application * @param flags Flags to affect the operation of the call @@ -328,8 +325,6 @@ log_start(const char *iniFile, const char *applicationName, /** * An alternative log_start where the caller gives the params directly. - * @param config - * @return * * @post to avoid memory leaks, the config argument must be free'ed using * `log_config_free()` @@ -344,8 +339,8 @@ log_start_from_param(const struct log_config *src_log_config); * The config can be customised by the caller before calling * log_start_from_param() * - * @param Default log level - * @param Log level name, or NULL. This can be used to provide an + * @param lvl log level + * @param override_name level name, or NULL. This can be used to provide an * override to the default log level, by environment variable or * argument. * @@ -357,10 +352,8 @@ log_config_init_for_console(enum logLevels lvl, const char *override_name); /** * Read configuration from a file and store the values in the returned * log_config. - * @param file - * @param applicationName, the application name used in the log events. - * @param section_prefix, prefix for the logging sections to parse - * @return + * @param applicationName the application name used in the log events. + * @param section_prefix prefix for the logging sections to parse */ struct log_config * log_config_init_from_config(const char *iniFilename, @@ -375,7 +368,6 @@ log_config_free(struct log_config *config); /** * Function that terminates all logging - * @return */ enum logReturns log_end(void); @@ -385,10 +377,8 @@ log_end(void); * * Please prefer to use the LOG and LOG_DEVEL macros instead of this function directly. * - * @param lvl, the loglevel - * @param msg, the logtext. - * @param ... - * @return + * @param lvl the loglevel + * @param msg the logtext. */ enum logReturns log_message(const enum logLevels lvl, const char *msg, ...) printflike(2, 3); @@ -405,13 +395,11 @@ log_hexdump(const enum logLevels log_level, * * Please prefer to use the LOG and LOG_DEVEL macros instead of this function directly. * - * @param function_name, the function name (typically the __func__ macro) - * @param file_name, the file name (typically the __FILE__ macro) - * @param line_number, the line number in the file (typically the __LINE__ macro) - * @param lvl, the loglevel - * @param msg, the logtext. - * @param ... - * @return + * @param function_name the function name (typically the __func__ macro) + * @param file_name the file name (typically the __FILE__ macro) + * @param line_number the line number in the file (typically the __LINE__ macro) + * @param lvl the loglevel + * @param msg the logtext. */ enum logReturns log_message_with_location(const char *function_name, @@ -434,13 +422,11 @@ log_hexdump_with_location(const char *function_name, * This function returns the configured file name for the logfile * @param replybuf the buffer where the reply is stored * @param bufsize how big is the reply buffer. - * @return */ char *getLogFile(char *replybuf, int bufsize); /** * Returns formatted datetime for log - * @return */ char *getFormattedDateTime(char *replybuf, int bufsize); diff --git a/common/os_calls.h b/common/os_calls.h index 9fdbad8b1b..dffa5866e3 100644 --- a/common/os_calls.h +++ b/common/os_calls.h @@ -151,7 +151,7 @@ int g_sck_select(int sck1, int sck2); * @param sck File descriptor for peer * @param ip buffer to write IP address to * @param bytes Size of ip buffer. Should be at least MAX_IP_ADDRSTRLEN - * @param[out] portptr Optional variable to receive the port number + * @param[out] port Optional variable to receive the port number * @return Pointer to IP for convenience * * If the peer has no IP address (for example, it is a Unix Domain Socket), @@ -202,7 +202,7 @@ int g_delete_wait_obj(tintptr obj); * @param read_objs Array of read objects * @param rcount Number of elements in read_objs * @param write_objs Array of write objects - * @param rcount Number of elements in write_objs + * @param wcount Number of elements in write_objs * @param mstimeout Timeout in milliseconds. < 0 means an infinite timeout. * * @return 0 for success. The objects will need to be polled to diff --git a/common/string_calls.h b/common/string_calls.h index a72f8efb24..ca6a292830 100644 --- a/common/string_calls.h +++ b/common/string_calls.h @@ -192,7 +192,7 @@ g_bytes_to_hexdump(const char *src, int len); /** * Extracts the display number from an X11 display string * - * @param Display string (i.e. g_getenv("DISPLAY")) + * @param display_text Display string (i.e. g_getenv("DISPLAY")) * * @result <0 if the string could not be parsed, or >=0 for a display number */ @@ -270,7 +270,6 @@ g_bitmask_to_charstr(int bitmask, const struct bitmask_char bitdefs[], * * @param str Input string * @param bitdefs Array mapping tokens to bitmask values - * @param delim Delimiter for tokens in str * @param[out] unrecognised Buffer for any unrecognised tokens * @param unrecognised_len Length of unrecognised including '\0'; * @return bitmask value for recognised tokens diff --git a/configure.ac b/configure.ac index 3a470ab366..2cbb353302 100644 --- a/configure.ac +++ b/configure.ac @@ -206,6 +206,7 @@ AX_GCC_FUNC_ATTRIBUTE([format]) AX_TYPE_SOCKLEN_T AX_CFLAGS_WARN_ALL AX_APPEND_COMPILE_FLAGS([-Wwrite-strings]) +AX_APPEND_COMPILE_FLAGS([-Wdocumentation -Wdocumentation-unknown-command], ,[-Werror]) AM_COND_IF([LINUX], [AX_APPEND_COMPILE_FLAGS([-Werror])]) # bsd has warnings that have not been fixed yet diff --git a/fontutils/dumpfv1.c b/fontutils/dumpfv1.c index d42c6fcdc2..5ad908d216 100644 --- a/fontutils/dumpfv1.c +++ b/fontutils/dumpfv1.c @@ -57,7 +57,7 @@ struct program_args * Parses the program args * * @param argc Passed to main - * @param @argv Passed to main + * @param argv Passed to main * @param pa program_pargs structure for resulting values * @return !=0 for success */ diff --git a/libipm/libipm.h b/libipm/libipm.h index 4d6bef2713..ae78779e8d 100644 --- a/libipm/libipm.h +++ b/libipm/libipm.h @@ -154,7 +154,7 @@ libipm_msg_out_init(struct trans *trans, unsigned short msgno, * * @param trans libipm transport * @param format a description of any arguments to add to the buffer. - * @param != 0 if an error occurs + * @return != 0 if an error occurs * * The format string is followed immediately by the arguments it * describes. The format string may contain these characters (from the @@ -299,7 +299,7 @@ libipm_msg_in_peek_type(struct trans *trans); * * @param trans libipm transport * @param format a description of the arguments to read from the buffer. - * @param != 0 if an error occurs + * @return != 0 if an error occurs * * The format string is followed immediately by the arguments it * describes. The format string may contain these characters (from the diff --git a/libipm/libipm_send.c b/libipm/libipm_send.c index ad04b0ca0f..0a1631ca44 100644 --- a/libipm/libipm_send.c +++ b/libipm/libipm_send.c @@ -471,7 +471,6 @@ libipm_msg_out_appendv(struct trans *trans, const char *format, va_list *argptr) * Prepare the transport to build an output message * @param trans libipm trans * @param msgno Number of message - * @return != 0 for error */ static void init_output_buffer(struct trans *trans, unsigned short msgno) diff --git a/libipm/scp_application_types.h b/libipm/scp_application_types.h index 89c7ca8aac..1e9a8aeced 100644 --- a/libipm/scp_application_types.h +++ b/libipm/scp_application_types.h @@ -65,7 +65,7 @@ struct scp_session_info enum scp_login_status { E_SCP_LOGIN_OK = 0, ///< The connection is now loggned in - E_SCP_LOGIN_ALREADY_LOGGED_IN, //< A user is currently logged in + E_SCP_LOGIN_ALREADY_LOGGED_IN, ///< A user is currently logged in E_SCP_LOGIN_NO_MEMORY, ///< Memory allocation failure /** * User couldn't be authenticated, or user doesn't exist */ diff --git a/libxrdp/xrdp_iso.c b/libxrdp/xrdp_iso.c index dde7a3eac2..c3343cad6f 100644 --- a/libxrdp/xrdp_iso.c +++ b/libxrdp/xrdp_iso.c @@ -258,7 +258,6 @@ xrdp_iso_process_rdp_neg_req(struct xrdp_iso *self, struct stream *s) * On exit, the TPKT header and the fixed part of the PDU header will have been * removed from the stream. * - * @param self * @param s [in] * @param code [out] * @param len [out] diff --git a/libxrdp/xrdp_mcs.c b/libxrdp/xrdp_mcs.c index 62221159a8..7b86fa6779 100644 --- a/libxrdp/xrdp_mcs.c +++ b/libxrdp/xrdp_mcs.c @@ -253,7 +253,6 @@ xrdp_mcs_recv(struct xrdp_mcs *self, struct stream *s, int *chan) * Parse the identifier and length of a [ITU-T X.690] BER (Basic Encoding Rules) * structure header. * - * @param self * @param s [in] - the stream to read from * @param tag_val [in] - the expected tag value * @param len [out] - the length of the structure @@ -1488,7 +1487,6 @@ xrdp_mcs_send(struct xrdp_mcs *self, struct stream *s, int chan) /** * Internal help function to close the socket - * @param self */ void close_rdp_socket(struct xrdp_mcs *self) diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c index deefd7a1f1..8e282e2305 100644 --- a/libxrdp/xrdp_rdp.c +++ b/libxrdp/xrdp_rdp.c @@ -1634,7 +1634,6 @@ xrdp_rdp_send_deactivate(struct xrdp_rdp *self) /*****************************************************************************/ /** Send a [MS-RDPBCGR] TS_SAVE_SESSION_INFO_PDU_DATA message. * - * @param self * @param data the data to send to the client in the * TS_SAVE_SESSION_INFO_PDU_DATA message. The first 4 bytes of the data * buffer MUST by the infoType value as specified in MS-RDPBCGR 2.2.10.1.1 diff --git a/sesman/chansrv/chansrv_config.c b/sesman/chansrv/chansrv_config.c index 57a106728e..9f3737f7a5 100644 --- a/sesman/chansrv/chansrv_config.c +++ b/sesman/chansrv/chansrv_config.c @@ -77,8 +77,8 @@ log_to_stdout(const enum logLevels lvl, const char *msg, ...) * * @param logmsg Function to use to log messages * @param names List of definitions in the section - * @params values List of corresponding values for the names - * @params cfg Pointer to structure we're filling in + * @param values List of corresponding values for the names + * @param cfg Pointer to structure we're filling in * * @return 0 for success */ @@ -130,8 +130,8 @@ read_config_security(log_func_t logmsg, * * @param logmsg Function to use to log messages * @param names List of definitions in the section - * @params values List of corresponding values for the names - * @params cfg Pointer to structure we're filling in + * @param values List of corresponding values for the names + * @param cfg Pointer to structure we're filling in * * @return 0 for success */ diff --git a/sesman/chansrv/chansrv_config.h b/sesman/chansrv/chansrv_config.h index 7a5fbe4c92..745261f676 100644 --- a/sesman/chansrv/chansrv_config.h +++ b/sesman/chansrv/chansrv_config.h @@ -65,7 +65,7 @@ config_read(int use_logger, const char *sesman_ini); /** * * @brief Dumps configuration to stdout - * @param pointer to a config_chansrv struct + * @param config pointer to a config_chansrv struct * */ void @@ -74,7 +74,7 @@ config_dump(struct config_chansrv *config); /** * * @brief Frees configuration allocated by config_read() - * @param pointer to a config_chansrv struct (may be NULL) + * @param cs pointer to a config_chansrv struct (may be NULL) * */ void diff --git a/sesman/chansrv/chansrv_fuse.c b/sesman/chansrv/chansrv_fuse.c index c89af18b6a..33793171d9 100644 --- a/sesman/chansrv/chansrv_fuse.c +++ b/sesman/chansrv/chansrv_fuse.c @@ -1,7 +1,7 @@ /** * xrdp: A Remote Desktop Protocol server. * - * Copyright (C) Laxmikant Rashinkar 2013 LK.Rashinkar@gmail.com + * Copyright (C) Laxmikant Rashinkar 2013 LK.Rashinkar\@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/sesman/chansrv/clipboard_common.h b/sesman/chansrv/clipboard_common.h index be08778d17..bc2a67e88b 100644 --- a/sesman/chansrv/clipboard_common.h +++ b/sesman/chansrv/clipboard_common.h @@ -69,7 +69,7 @@ struct clip_file_desc /* CLIPRDR_FILEDESCRIPTOR */ * Input a terminated UTF-16 string from a stream as UTF-8. * @param s stream * @param text UTF-8 String buffer - * @param text_len Length of above + * @param num_chars Length of above * @return number of bytes copied from stream */ unsigned int diff --git a/sesman/chansrv/clipboard_file.h b/sesman/chansrv/clipboard_file.h index 17084cab71..4672c2aaf7 100644 --- a/sesman/chansrv/clipboard_file.h +++ b/sesman/chansrv/clipboard_file.h @@ -35,7 +35,7 @@ clipboard_process_file_response(struct stream *s, int clip_msg_status, * * Files in the list are added to the xfs filesystem in the clipboard * directory. The filenames names are added to the 'file_list' for the user. - * Files are prefixed with '/' and separated by '\n'. + * Files are prefixed with '/' and separated by '\\n'. * * If the list is not big enough, whole filenames are omitted, and a warning * message is logged. This is not an error. diff --git a/sesman/chansrv/devredir.c b/sesman/chansrv/devredir.c index 1a1df6da41..59fc70e503 100644 --- a/sesman/chansrv/devredir.c +++ b/sesman/chansrv/devredir.c @@ -1417,7 +1417,6 @@ devredir_get_dir_listing(struct state_dirscan *fusep, tui32 device_id, * @param fusep opaque data struct that we just pass back to FUSE when done * @param device_id device_id of the redirected share * @param path the name of the directory containing the file - * @param file the filename * * @return 0 on success, -1 on failure *****************************************************************************/ diff --git a/sesman/chansrv/smartcard.c b/sesman/chansrv/smartcard.c index 03c453b3df..7dd1edd210 100644 --- a/sesman/chansrv/smartcard.c +++ b/sesman/chansrv/smartcard.c @@ -452,7 +452,6 @@ scard_send_list_readers(void *user_data, char *context, int context_bytes, /** * Send get change in status command * - * @param con connection to client * @param wide TRUE if unicode string * @param timeout timeout in milliseconds, -1 for infinity * @param num_readers number of entries in rsa @@ -488,7 +487,6 @@ scard_send_get_status_change(void *user_data, char *context, int context_bytes, /** * Open a connection to the smart card located in the reader * - * @param con connection to client * @param wide TRUE if unicode string *****************************************************************************/ int @@ -520,8 +518,6 @@ scard_send_connect(void *user_data, char *context, int context_bytes, * The reconnect method re-establishes a smart card reader handle. On success, * the handle is valid once again. * - * @param con connection to client - * @param sc_handle handle to device * @param rs reader state where following fields are set * rs.shared_mode_flag * rs.preferred_protocol @@ -556,7 +552,6 @@ scard_send_reconnect(void *user_data, char *context, int context_bytes, * Lock smart card reader for exclusive access for specified smart * card reader handle. * - * @param con connection to client *****************************************************************************/ int scard_send_begin_transaction(void *user_data, char *context, int context_bytes, @@ -587,8 +582,6 @@ scard_send_begin_transaction(void *user_data, char *context, int context_bytes, * Release a smart card reader after being locked by a previously * successful call to Begin Transaction * - * @param con connection to client - * @param sc_handle handle to smartcard *****************************************************************************/ int scard_send_end_transaction(void *user_data, char *context, int context_bytes, @@ -620,7 +613,6 @@ scard_send_end_transaction(void *user_data, char *context, int context_bytes, /** * Get the status of a connection for a valid smart card reader handle * - * @param con connection to client * @param wide TRUE if unicode string *****************************************************************************/ int @@ -653,8 +645,6 @@ scard_send_status(void *user_data, int wide, char *context, int context_bytes, /** * Release a smart card reader handle that was acquired in ConnectA/ConnectW * - * @param con connection to client - * @param sc_handle handle to smartcard *****************************************************************************/ int scard_send_disconnect(void *user_data, char *context, int context_bytes, @@ -1584,8 +1574,6 @@ scard_send_Connect(IRP *irp, char *context, int context_bytes, * The reconnect method re-establishes a smart card reader handle. On success, * the handle is valid once again. * - * @param con connection to client - * @param sc_handle handle to device * @param rs reader state where following fields are set * rs.shared_mode_flag * rs.preferred_protocol @@ -1660,7 +1648,6 @@ scard_send_Reconnect(IRP *irp, char *context, int context_bytes, * Lock smart card reader for exclusive access for specified smart * card reader handle. * - * @param con connection to client *****************************************************************************/ static void scard_send_BeginTransaction(IRP *irp, char *context, int context_bytes, @@ -1726,8 +1713,6 @@ scard_send_BeginTransaction(IRP *irp, char *context, int context_bytes, * Release a smart card reader after being locked by a previously * successful call to Begin Transaction * - * @param con connection to client - * @param sc_handle handle to smartcard *****************************************************************************/ static void scard_send_EndTransaction(IRP *irp, char *context, int context_bytes, @@ -1793,7 +1778,6 @@ scard_send_EndTransaction(IRP *irp, char *context, int context_bytes, /** * Get the status of a connection for a valid smart card reader handle * - * @param con connection to client * @param wide TRUE if unicode string *****************************************************************************/ static void @@ -1881,8 +1865,6 @@ scard_send_Status(IRP *irp, int wide, char *context, int context_bytes, /** * Release a smart card reader handle that was acquired in ConnectA/ConnectW * - * @param con connection to client - * @param sc_handle handle to smartcard *****************************************************************************/ static void scard_send_Disconnect(IRP *irp, char *context, int context_bytes, diff --git a/sesman/eicp_process.h b/sesman/eicp_process.h index 8bb3cd3055..58787c5c8f 100644 --- a/sesman/eicp_process.h +++ b/sesman/eicp_process.h @@ -32,7 +32,6 @@ struct pre_session_item; /** * * @brief Processes an EICP message - * @param sc the sesman connection * */ int diff --git a/sesman/ercp_process.h b/sesman/ercp_process.h index d6593aaddc..b5e8e3722f 100644 --- a/sesman/ercp_process.h +++ b/sesman/ercp_process.h @@ -32,7 +32,6 @@ struct session_item; /** * * @brief Processes an ERCP message - * @param sc the sesman connection * */ int diff --git a/sesman/libsesman/sesman_auth.h b/sesman/libsesman/sesman_auth.h index 61537ab246..70aeae0e3f 100644 --- a/sesman/libsesman/sesman_auth.h +++ b/sesman/libsesman/sesman_auth.h @@ -39,7 +39,7 @@ struct auth_info; * @param user user's login name * @param pass user's password * @param client_ip IP address of connecting client (or ""/NULL if not known) - * @param[out] Error code for the operation. E_SCP_LOGIN_OK on success. + * @param[out] errorcode Error code for the operation. E_SCP_LOGIN_OK on success. * @return auth handle on success, NULL on failure * */ @@ -51,8 +51,8 @@ auth_userpass(const char *user, const char *pass, * * @brief Gets an auth handle for a UDS login * - * @param uid User ID - * @param[out] Error code for the operation. E_SCP_LOGIN_OK on success. + * @param user User ID + * @param[out] errorcode Error code for the operation. E_SCP_LOGIN_OK on success. * Can be NULL if this information isn't required. * @return auth handle on success, NULL on failure * @@ -63,7 +63,7 @@ auth_uds(const char *user, enum scp_login_status *errorcode); /** * * @brief Starts a session - * @param auth_info. Auth handle created by auth_userpass + * @param auth_info Auth handle created by auth_userpass * @param display_num Display number * @return 0 on success, 1 on failure * @@ -76,7 +76,7 @@ auth_start_session(struct auth_info *auth_info, int display_num); /** * * @brief Deallocates an auth handle and releases all resources - * @param auth_info. Auth handle created by auth_userpass + * @param auth_info Auth handle created by auth_userpass * @return 0 on success, 1 on failure * */ @@ -91,7 +91,7 @@ auth_end(struct auth_info *auth_info); * This call is only effective for PAM-based environments. It must be made * after the context has been switched to the logged-in user. * - * @param auth_info. Auth handle created by auth_userpass + * @param auth_info Auth handle created by auth_userpass * @return 0 on success, 1 on failure * */ diff --git a/sesman/libsesman/sesman_config.c b/sesman/libsesman/sesman_config.c index 9e3d9e7286..8edc693e3b 100644 --- a/sesman/libsesman/sesman_config.c +++ b/sesman/libsesman/sesman_config.c @@ -396,7 +396,7 @@ config_read_security(int file, struct config_security *sc, * * @brief Reads sesman [Sessions] configuration section * @param file configuration file descriptor - * @param ss pointer to a config_sessions struct + * @param se pointer to a config_sessions struct * @param param_n parameter name list * @param param_v parameter value list * @return 0 on success, 1 on failure diff --git a/sesman/libsesman/sesman_config.h b/sesman/libsesman/sesman_config.h index 5f403fa159..5a2eed63c0 100644 --- a/sesman/libsesman/sesman_config.h +++ b/sesman/libsesman/sesman_config.h @@ -165,7 +165,7 @@ struct config_sessions * @struct config_sesman * @brief struct that contains sesman configuration * - * This struct contains all of sesman configuration parameters\n + * This struct contains all of sesman configuration parameters
* Every parameter in [globals] is a member of this struct, other * sections options are embedded in this struct as member structures * @@ -261,7 +261,7 @@ config_read(const char *sesman_ini); /** * * @brief Dumps configuration - * @param pointer to a config_sesman struct + * @param config pointer to a config_sesman struct * */ void @@ -270,7 +270,7 @@ config_dump(struct config_sesman *config); /** * * @brief Frees configuration allocated by config_read() - * @param pointer to a config_sesman struct (may be NULL) + * @param cs pointer to a config_sesman struct (may be NULL) * */ void diff --git a/sesman/pre_session_list.c b/sesman/pre_session_list.c index ebc15af662..54f0b2fb11 100644 --- a/sesman/pre_session_list.c +++ b/sesman/pre_session_list.c @@ -54,7 +54,7 @@ static struct list *g_pre_session_list = NULL; * * Any auth_info struct found in the sesman_con is also deallocated. * - * @param sc struct to de-allocate + * @param psi struct to de-allocate */ static void free_pre_session_item(struct pre_session_item *psi) diff --git a/sesman/pre_session_list.h b/sesman/pre_session_list.h index 5f21773181..9ddd44f675 100644 --- a/sesman/pre_session_list.h +++ b/sesman/pre_session_list.h @@ -130,7 +130,7 @@ pre_session_list_set_peername(struct pre_session_item *psi, const char *name); /** * @brief Get the wait objs for the pre-session list module - * @param @robjs Objects array to update + * @param robjs Objects array to update * @param robjs_count Elements in robjs (by reference) * @return 0 for success */ diff --git a/sesman/sesexec/login_info.c b/sesman/sesexec/login_info.c index adb8ef1add..4e2ea960a5 100644 --- a/sesman/sesexec/login_info.c +++ b/sesman/sesexec/login_info.c @@ -65,7 +65,7 @@ log_authfail_message(const char *username, const char *ip_addr) /** * Authenticate and authorize the connection * - * @param username Name for user + * @param supplied_username Name for user * @param password Password * @param ip_addr Remote IP address * @param login_info Structure to fill in for a successful login diff --git a/sesman/sesexec/login_info.h b/sesman/sesexec/login_info.h index a6171fc4d4..5479a87d3d 100644 --- a/sesman/sesexec/login_info.h +++ b/sesman/sesexec/login_info.h @@ -78,7 +78,6 @@ login_info_sys_login_user(struct trans *scp_trans, * Errors are logged. * * @param scp_trans SCP transport for talking to the client - * @param ip_addr IP address for xrdp client * * @result Allocated login_info struct for a successful login */ diff --git a/sesman/sesexec/session.c b/sesman/sesexec/session.c index f9c408205b..a8853ac138 100644 --- a/sesman/sesexec/session.c +++ b/sesman/sesexec/session.c @@ -57,7 +57,7 @@ struct session_data { pid_t x_server; ///< PID of X server pid_t win_mgr; ///< PID of window manager - pid_t chansrv; //< PID of chansrv + pid_t chansrv; ///< PID of chansrv time_t start_time; struct session_parameters params; // Flexible array member used to store strings in params and ip_addr; @@ -150,10 +150,8 @@ session_data_free(struct session_data *session_data) /******************************************************************************/ /** * Creates a string consisting of all parameters that is hosted in the param list - * @param self - * @param outstr, allocate this buffer before you use this function + * @param outstr allocate this buffer before you use this function * @param len the allocated len for outstr - * @return */ char * dumpItemsToString(struct list *self, char *outstr, int len) diff --git a/sesman/sesexec/session.h b/sesman/sesexec/session.h index 5cfab1409f..0f2ff52843 100644 --- a/sesman/sesexec/session.h +++ b/sesman/sesexec/session.h @@ -118,7 +118,7 @@ session_send_term(struct session_data *sd); /** * Frees a session_data object * - * @param sd session_data for this session + * @param session_data session_data for this session * * Do not call this until session_active() returns zero, or you * lose the ability to track the session PIDs diff --git a/sesman/sesman.c b/sesman/sesman.c index 6aafbc97d1..f0aefb433d 100644 --- a/sesman/sesman.c +++ b/sesman/sesman.c @@ -123,7 +123,7 @@ static int nocase_matches(const char *candidate, ...) * @brief Command line argument parser * @param[in] argc number of command line arguments * @param[in] argv pointer array of commandline arguments - * @param[out] sesman_startup_params Returned startup parameters + * @param[out] startup_params Returned startup parameters * @return 0 on success, n on nth argument is unknown * */ diff --git a/sesman/session_list.h b/sesman/session_list.h index b018afad97..3d7c7a5eb7 100644 --- a/sesman/session_list.h +++ b/sesman/session_list.h @@ -154,7 +154,7 @@ free_session_info_list(struct scp_session_info *sesslist, unsigned int cnt); /** * @brief Get the wait objs for the session list module - * @param @robjs Objects array to update + * @param robjs Objects array to update * @param robjs_count Elements in robjs (by reference) * @return 0 for success */ diff --git a/sesman/tools/authtest.c b/sesman/tools/authtest.c index 9224204b95..c33ba80d12 100644 --- a/sesman/tools/authtest.c +++ b/sesman/tools/authtest.c @@ -91,7 +91,7 @@ usage(void) * Read a password from a file descriptor * * @param fd_str string representing file descriptor - * @param sp Authmod parameter structure for resulting password + * @param amp Authmod parameter structure for resulting password * @return !=0 for success */ static int @@ -122,7 +122,7 @@ read_password_from_fd(const char *fd_str, struct authmod_params *amp) * Parses the program args * * @param argc Passed to main - * @param @argv Passed to main + * @param argv Passed to main * @param amp Authmod parameter structure for resulting values * @return !=0 for success */ diff --git a/sesman/tools/sesrun.c b/sesman/tools/sesrun.c index b727da353d..dab9db6102 100644 --- a/sesman/tools/sesrun.c +++ b/sesman/tools/sesrun.c @@ -107,7 +107,7 @@ struct session_params /**************************************************************************//** * Maps a string to a session type value * - * @param string session type string + * @param t session type string * @param[out] value session type value * @return 0 for success or != 0 if not found */ @@ -274,7 +274,7 @@ read_password_from_fd(const char *fd_str, struct session_params *sp) * Parses the program args * * @param argc Passed to main - * @param @argv Passed to main + * @param argv Passed to main * @param sp Session parameter structure for resulting values * @param sesman_ini Pointer to an alternative config file if one is specified * @return !=0 for success diff --git a/vnc/vnc.c b/vnc/vnc.c index ce53fbfca3..3a8122b506 100644 --- a/vnc/vnc.c +++ b/vnc/vnc.c @@ -821,7 +821,7 @@ get_bytes_per_pixel(int bpp) /**************************************************************************//** * Skips the specified number of bytes from the transport * - * @param transport Transport to read + * @param trans Transport to read * @param bytes Bytes to skip * @return != 0 for error */ @@ -2019,7 +2019,6 @@ lib_mod_end(struct vnc *v) * @param [in] height session height * @param [in] num_monitors (can be 0, meaning one monitor) * @param [in] monitors Monitor definitions for num_monitors > 0 - * @param [in] multimon_configured Whether multimon is configured */ static void init_client_layout(struct vnc *v, diff --git a/vnc/vnc_clip.c b/vnc/vnc_clip.c index 364bdff7b1..5f6707e6a7 100644 --- a/vnc/vnc_clip.c +++ b/vnc/vnc_clip.c @@ -249,7 +249,7 @@ char_count_in(const struct stream *s, char c) * * @param v VNC module * @param msg_flags clipHeader msgFlags field - * @params s formatListData object. + * @param s formatListData object. * @return Preferred text format, or 0 if not found */ static int diff --git a/vnc/vnc_clip.h b/vnc/vnc_clip.h index 3bab382b66..fe07fc19f0 100644 --- a/vnc/vnc_clip.h +++ b/vnc/vnc_clip.h @@ -39,7 +39,7 @@ vnc_clip_exit(struct vnc *v); /** * Process incoming data from the RDP clip channel * @param v VNC Object - * @param s Stream object containing data + * @param data Stream object containing data * * @return Non-zero if error occurs */ diff --git a/xrdp/xrdp.c b/xrdp/xrdp.c index b2f9492002..e5b9ed7c11 100644 --- a/xrdp/xrdp.c +++ b/xrdp/xrdp.c @@ -148,9 +148,9 @@ xrdp_sig_no_op(int sig) /** * * @brief Command line argument parser - * @param number of command line arguments - * @param pointer array of commandline arguments - * @param [out] Returned startup parameters + * @param argc number of command line arguments + * @param argv pointer array of commandline arguments + * @param startup_params [out] Returned startup parameters * @return 0 on success, n on nth argument is unknown * */ diff --git a/xrdp/xrdp_bitmap_load.c b/xrdp/xrdp_bitmap_load.c index f51d9f9d24..35f4e9da4a 100644 --- a/xrdp/xrdp_bitmap_load.c +++ b/xrdp/xrdp_bitmap_load.c @@ -182,8 +182,8 @@ swap_pixel_data(struct xrdp_bitmap *a, struct xrdp_bitmap *b) * Scales a bitmap image * * @param self Bitmap to scale - * @param target_width target width - * @param target_height target height + * @param targ_width target width + * @param targ_height target height * @return 0 for success */ static int @@ -230,8 +230,8 @@ xrdp_bitmap_scale(struct xrdp_bitmap *self, int targ_width, int targ_height) * Zooms a bitmap image * * @param self Bitmap to zoom - * @param target_width target width - * @param target_height target height + * @param targ_width target width + * @param targ_height target height * @return 0 for success * * This works the same way as a scaled image, but the aspect ratio is @@ -776,7 +776,7 @@ log_imlib2_error(enum logLevels level, const char *filename, * @param filename Filename we're working on (for error reporting) * @param r Background red * @param g Background green - * @param g Background blue + * @param b Background blue * * @return 0 for success. On failure the current context image is unchanged. */ From c36e834b43e7708febac18805c5a5159a2358506 Mon Sep 17 00:00:00 2001 From: firewave Date: Fri, 20 Oct 2023 17:45:50 +0200 Subject: [PATCH 2/2] configure.ac: treat freetype2 include folder as a system one --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2cbb353302..ab81bc9a7e 100644 --- a/configure.ac +++ b/configure.ac @@ -319,7 +319,7 @@ case "$with_freetype2" in fi if test -f $with_freetype2/include/freetype2/ft2build.h; then - FREETYPE2_CFLAGS="-I $with_freetype2/include/freetype2" + FREETYPE2_CFLAGS="-isystem $with_freetype2/include/freetype2" else AC_MSG_RESULT([no]) AC_MSG_ERROR([Can't find $with_freetype2/include/freetype2/ft2build.h])