diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2023-09-23 08:57:36 +0200 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2023-09-23 08:57:36 +0200 |
commit | 53a0dabcd40800f4ddf6593be4ef7ecf8f5b2225 (patch) | |
tree | 2441d033217784dd7b6fd6e3cc0d62f4b75a9fb7 /src/util/bio.c | |
parent | 6304a090df056836158e485846eb632be508e32f (diff) | |
download | gnunet-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.c | 31 |
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 | */ |
161 | int | 162 | enum GNUNET_GenericReturnValue |
162 | GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg) | 163 | GNUNET_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 | */ |
290 | int | 291 | enum GNUNET_GenericReturnValue |
291 | GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, | 292 | GNUNET_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 | */ |
329 | int | 330 | enum GNUNET_GenericReturnValue |
330 | GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, | 331 | GNUNET_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 | */ |
391 | int | 392 | enum GNUNET_GenericReturnValue |
392 | GNUNET_BIO_read_float (struct GNUNET_BIO_ReadHandle *h, | 393 | GNUNET_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 | */ |
408 | int | 409 | enum GNUNET_GenericReturnValue |
409 | GNUNET_BIO_read_double (struct GNUNET_BIO_ReadHandle *h, | 410 | GNUNET_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 | */ |
426 | int | 427 | enum GNUNET_GenericReturnValue |
427 | GNUNET_BIO_read_int32 (struct GNUNET_BIO_ReadHandle *h, | 428 | GNUNET_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 | */ |
448 | int | 449 | enum GNUNET_GenericReturnValue |
449 | GNUNET_BIO_read_int64 (struct GNUNET_BIO_ReadHandle *h, | 450 | GNUNET_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 | */ |
751 | int | 752 | enum GNUNET_GenericReturnValue |
752 | GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, | 753 | GNUNET_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 | */ |
788 | int | 789 | enum GNUNET_GenericReturnValue |
789 | GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, | 790 | GNUNET_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 | */ |
811 | int | 812 | enum GNUNET_GenericReturnValue |
812 | GNUNET_BIO_write_float (struct GNUNET_BIO_WriteHandle *h, | 813 | GNUNET_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 | */ |
828 | int | 829 | enum GNUNET_GenericReturnValue |
829 | GNUNET_BIO_write_double (struct GNUNET_BIO_WriteHandle *h, | 830 | GNUNET_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 | */ |
846 | int | 847 | enum GNUNET_GenericReturnValue |
847 | GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, | 848 | GNUNET_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 | */ |
866 | int | 867 | enum GNUNET_GenericReturnValue |
867 | GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h, | 868 | GNUNET_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 | */ |
1107 | int | 1108 | enum GNUNET_GenericReturnValue |
1108 | GNUNET_BIO_read_spec_commit (struct GNUNET_BIO_ReadHandle *h, | 1109 | GNUNET_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 | */ |
1358 | int | 1359 | enum GNUNET_GenericReturnValue |
1359 | GNUNET_BIO_write_spec_commit (struct GNUNET_BIO_WriteHandle *h, | 1360 | GNUNET_BIO_write_spec_commit (struct GNUNET_BIO_WriteHandle *h, |
1360 | struct GNUNET_BIO_WriteSpec *ws) | 1361 | struct GNUNET_BIO_WriteSpec *ws) |
1361 | { | 1362 | { |