wireshark/wsutil/console_win32.h
David Perry 5f485d59c9 Fix trivial clang warnings on MSYS2 Windows build
Fix some trivial but fatal warnings generated by clang when run under a
Windows MSYS2 build. Most are `-Wdocumentation` warnings caused by
docstring comments slipping out of sync with the code they document.

Remove unused variable `i_handles` from `sync_pipe_start()` in
`capture/capture_sync.c` to prevent a `-Wunused-but-set` error.

Use `DIAG_OFF(unreachable-code)` in `wsutil/test_wsutil.c` to prevent a
fully-expected `Wunreachable-code` "error" caused by short-circuiting
the function in Windows.

All changes have been confirmed to have no ill effect on a MSVC Windows
build. Changes should not negatively impact other platforms but this has
not been confirmed.
2025-06-03 15:04:21 -04:00

74 lines
1.2 KiB
C

/** @file
*
* Console support for MSWindows
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 2002, Jeffrey C. Foster <jfoste@woodward.com>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef __CONSOLE_WIN32_H__
#define __CONSOLE_WIN32_H__
#include <wireshark.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#ifdef _WIN32
/** @file
* Win32 specific console.
*/
/** Create Windows console.
*
*/
WS_DLL_PUBLIC
void create_console(void);
/** Connect to stdio if available.
*
*/
WS_DLL_PUBLIC
void restore_pipes(void);
/** Destroy Windows console.
*
*/
WS_DLL_PUBLIC
void destroy_console(void);
/** Set console wait.
* @param console_wait set/no set console wait
*/
WS_DLL_PUBLIC
void set_console_wait(bool console_wait);
/** get console wait
* @return set/no set console wait
*/
WS_DLL_PUBLIC
bool get_console_wait(void);
/** Set stdin capture.
* @param set_stdin_capture whether to enable stdin capture
*/
WS_DLL_PUBLIC
void set_stdin_capture(bool set_stdin_capture);
/** get stdin caputre
* @return set/no set stdin_capture
*/
WS_DLL_PUBLIC
bool get_stdin_capture(void);
#endif/* _WIN32 */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __CONSOLE_WIN32_H__ */