@@ -61,22 +61,22 @@ typedef struct {
6161 char_port_t * port ;
6262 int mode ;
6363 uint32_t last_connect_attempt ;
64- int reconnect : 1 ;
65- int server : 1 ;
64+ unsigned int reconnect : 1 ;
65+ unsigned int server : 1 ;
6666#ifdef _WIN32
67- int connected : 1 ;
68- int block_connect : 1 ;
69- char path [257 ]; /* "The entire pipe name string can be up to 256 characters long." */
70- HANDLE fd ;
67+ unsigned int connected : 1 ;
68+ unsigned int block_connect : 1 ;
69+ char path [257 ]; /* "The entire pipe name string can be up to 256 characters long." */
70+ HANDLE fd ;
7171#else
72- int block_connect_in : 1 ;
73- int block_connect_out : 1 ;
74- int direction : 1 ;
75- size_t path_len ;
76- char * path_in ;
77- char * path_out ;
78- int fd_in ;
79- int fd_out ;
72+ unsigned int block_connect_in : 1 ;
73+ unsigned int block_connect_out : 1 ;
74+ unsigned int direction : 1 ;
75+ size_t path_len ;
76+ char * path_in ;
77+ char * path_out ;
78+ int fd_in ;
79+ int fd_out ;
8080#endif
8181} char_pipe_t ;
8282
@@ -143,7 +143,7 @@ char_pipe_connect(char_pipe_t *dev, int startup)
143143 char msg [1024 ];
144144#ifdef _WIN32
145145 /* Connect or create pipe. */
146- char fmt [512 ];
146+ char fmt [512 ];
147147 DWORD create_err = 0 ;
148148 if (dev -> mode != CHAR_PIPE_MODE_CLIENT ) {
149149 dev -> fd = CreateNamedPipeA (dev -> path , PIPE_ACCESS_DUPLEX | FILE_FLAG_FIRST_PIPE_INSTANCE , PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT , 1 , 65536 , 65536 , NMPWAIT_USE_DEFAULT_WAIT , NULL );
@@ -237,8 +237,8 @@ char_pipe_connect(char_pipe_t *dev, int startup)
237237 if (CHAR_FD_VALID (* target ))
238238 continue ;
239239
240- const char * path = ((i ^ !! dev -> direction ) == 0 ) ? dev -> path_out : dev -> path_in ;
241- int create_err = 0 ;
240+ const char * path = ((i ^ dev -> direction ) == 0 ) ? dev -> path_out : dev -> path_in ;
241+ int create_err = 0 ;
242242 if (CHAR_FD_VALID (out_test_fd )) {
243243 /* Reuse file descriptor from earlier test. */
244244 * target = out_test_fd ;
0 commit comments