aboutsummaryrefslogtreecommitdiff
path: root/src/util/bio.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2023-09-23 08:57:36 +0200
committerMartin Schanzenbach <schanzen@gnunet.org>2023-09-23 08:57:36 +0200
commit53a0dabcd40800f4ddf6593be4ef7ecf8f5b2225 (patch)
tree2441d033217784dd7b6fd6e3cc0d62f4b75a9fb7 /src/util/bio.c
parent6304a090df056836158e485846eb632be508e32f (diff)
downloadgnunet-53a0dabcd40800f4ddf6593be4ef7ecf8f5b2225.tar.gz
gnunet-53a0dabcd40800f4ddf6593be4ef7ecf8f5b2225.zip
BUILD: Silence int/enum mismatch compiler warnings and curl deprecated defines
Diffstat (limited to 'src/util/bio.c')
-rw-r--r--src/util/bio.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/util/bio.c b/src/util/bio.c
index 7e3aa0d16..3a463bcd1 100644
--- a/src/util/bio.c
+++ b/src/util/bio.c
@@ -23,6 +23,7 @@
23 * @author Christian Grothoff 23 * @author Christian Grothoff
24 */ 24 */
25 25
26#include "gnunet_common.h"
26#include "platform.h" 27#include "platform.h"
27#include "gnunet_util_lib.h" 28#include "gnunet_util_lib.h"
28 29
@@ -158,7 +159,7 @@ GNUNET_BIO_read_open_buffer (void *buffer, size_t size)
158 * value is #GNUNET_SYSERR 159 * value is #GNUNET_SYSERR
159 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise 160 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise
160 */ 161 */
161int 162enum GNUNET_GenericReturnValue
162GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg) 163GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg)
163{ 164{
164 int err; 165 int err;
@@ -287,7 +288,7 @@ read_from_buffer (struct GNUNET_BIO_ReadHandle *h,
287 * @param len the number of bytes to read 288 * @param len the number of bytes to read
288 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure 289 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
289 */ 290 */
290int 291enum GNUNET_GenericReturnValue
291GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, 292GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h,
292 const char *what, 293 const char *what,
293 void *result, 294 void *result,
@@ -326,7 +327,7 @@ GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h,
326 * @param max_length maximum allowed length for the string 327 * @param max_length maximum allowed length for the string
327 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure 328 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
328 */ 329 */
329int 330enum GNUNET_GenericReturnValue
330GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, 331GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h,
331 const char *what, 332 const char *what,
332 char **result, 333 char **result,
@@ -388,7 +389,7 @@ GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h,
388 * @param what describes what is being read (for error message creation) 389 * @param what describes what is being read (for error message creation)
389 * @param f address of float to read 390 * @param f address of float to read
390 */ 391 */
391int 392enum GNUNET_GenericReturnValue
392GNUNET_BIO_read_float (struct GNUNET_BIO_ReadHandle *h, 393GNUNET_BIO_read_float (struct GNUNET_BIO_ReadHandle *h,
393 const char *what, 394 const char *what,
394 float *f) 395 float *f)
@@ -405,7 +406,7 @@ GNUNET_BIO_read_float (struct GNUNET_BIO_ReadHandle *h,
405 * @param what describes what is being read (for error message creation) 406 * @param what describes what is being read (for error message creation)
406 * @param f address of double to read 407 * @param f address of double to read
407 */ 408 */
408int 409enum GNUNET_GenericReturnValue
409GNUNET_BIO_read_double (struct GNUNET_BIO_ReadHandle *h, 410GNUNET_BIO_read_double (struct GNUNET_BIO_ReadHandle *h,
410 const char *what, 411 const char *what,
411 double *f) 412 double *f)
@@ -423,7 +424,7 @@ GNUNET_BIO_read_double (struct GNUNET_BIO_ReadHandle *h,
423 * @param i where to store the data 424 * @param i where to store the data
424 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 425 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
425 */ 426 */
426int 427enum GNUNET_GenericReturnValue
427GNUNET_BIO_read_int32 (struct GNUNET_BIO_ReadHandle *h, 428GNUNET_BIO_read_int32 (struct GNUNET_BIO_ReadHandle *h,
428 const char *what, 429 const char *what,
429 int32_t *i) 430 int32_t *i)
@@ -445,7 +446,7 @@ GNUNET_BIO_read_int32 (struct GNUNET_BIO_ReadHandle *h,
445 * @param i where to store the data 446 * @param i where to store the data
446 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 447 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
447 */ 448 */
448int 449enum GNUNET_GenericReturnValue
449GNUNET_BIO_read_int64 (struct GNUNET_BIO_ReadHandle *h, 450GNUNET_BIO_read_int64 (struct GNUNET_BIO_ReadHandle *h,
450 const char *what, 451 const char *what,
451 int64_t *i) 452 int64_t *i)
@@ -748,7 +749,7 @@ write_to_buffer (struct GNUNET_BIO_WriteHandle *h,
748 * @param n number of bytes to write 749 * @param n number of bytes to write
749 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 750 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
750 */ 751 */
751int 752enum GNUNET_GenericReturnValue
752GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, 753GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h,
753 const char *what, 754 const char *what,
754 const void *buffer, 755 const void *buffer,
@@ -785,7 +786,7 @@ GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h,
785 * @param s string to write (can be NULL) 786 * @param s string to write (can be NULL)
786 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 787 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
787 */ 788 */
788int 789enum GNUNET_GenericReturnValue
789GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, 790GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h,
790 const char *what, 791 const char *what,
791 const char *s) 792 const char *s)
@@ -808,7 +809,7 @@ GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h,
808 * @param what what is being written (for error message creation) 809 * @param what what is being written (for error message creation)
809 * @param f float to write 810 * @param f float to write
810 */ 811 */
811int 812enum GNUNET_GenericReturnValue
812GNUNET_BIO_write_float (struct GNUNET_BIO_WriteHandle *h, 813GNUNET_BIO_write_float (struct GNUNET_BIO_WriteHandle *h,
813 const char *what, 814 const char *what,
814 float f) 815 float f)
@@ -825,7 +826,7 @@ GNUNET_BIO_write_float (struct GNUNET_BIO_WriteHandle *h,
825 * @param what what is being written (for error message creation) 826 * @param what what is being written (for error message creation)
826 * @param f double to write 827 * @param f double to write
827 */ 828 */
828int 829enum GNUNET_GenericReturnValue
829GNUNET_BIO_write_double (struct GNUNET_BIO_WriteHandle *h, 830GNUNET_BIO_write_double (struct GNUNET_BIO_WriteHandle *h,
830 const char *what, 831 const char *what,
831 double f) 832 double f)
@@ -843,7 +844,7 @@ GNUNET_BIO_write_double (struct GNUNET_BIO_WriteHandle *h,
843 * @param i 32-bit integer to write 844 * @param i 32-bit integer to write
844 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 845 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
845 */ 846 */
846int 847enum GNUNET_GenericReturnValue
847GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, 848GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h,
848 const char *what, 849 const char *what,
849 int32_t i) 850 int32_t i)
@@ -863,7 +864,7 @@ GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h,
863 * @param i 64-bit integer to write 864 * @param i 64-bit integer to write
864 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 865 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
865 */ 866 */
866int 867enum GNUNET_GenericReturnValue
867GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h, 868GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h,
868 const char *what, 869 const char *what,
869 int64_t i) 870 int64_t i)
@@ -1104,7 +1105,7 @@ GNUNET_BIO_read_spec_double (const char *what, double *f)
1104 * the last element must be #GNUNET_BIO_read_spec_end 1105 * the last element must be #GNUNET_BIO_read_spec_end
1105 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise 1106 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise
1106 */ 1107 */
1107int 1108enum GNUNET_GenericReturnValue
1108GNUNET_BIO_read_spec_commit (struct GNUNET_BIO_ReadHandle *h, 1109GNUNET_BIO_read_spec_commit (struct GNUNET_BIO_ReadHandle *h,
1109 struct GNUNET_BIO_ReadSpec *rs) 1110 struct GNUNET_BIO_ReadSpec *rs)
1110{ 1111{
@@ -1355,7 +1356,7 @@ GNUNET_BIO_write_spec_double (const char *what, double *f)
1355 * the last element must be #GNUNET_BIO_write_spec_end 1356 * the last element must be #GNUNET_BIO_write_spec_end
1356 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise 1357 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise
1357 */ 1358 */
1358int 1359enum GNUNET_GenericReturnValue
1359GNUNET_BIO_write_spec_commit (struct GNUNET_BIO_WriteHandle *h, 1360GNUNET_BIO_write_spec_commit (struct GNUNET_BIO_WriteHandle *h,
1360 struct GNUNET_BIO_WriteSpec *ws) 1361 struct GNUNET_BIO_WriteSpec *ws)
1361{ 1362{