From 1451665d5b2e1c375af55aad70849bf5642bfa60 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 30 Nov 2020 23:53:39 +0100 Subject: hurd_types: Add const_string_t type This will allow to relieve constraints in callers, e.g. dir_lookup("") would otherwise produce a warning with gcc-11 since char[1024] would mean that dir_lookup would read all 1024 characters while it is not. * hurd/hurd_types.h (const_string_t): New type. --- hurd/hurd_types.h | 1 + 1 file changed, 1 insertion(+) (limited to 'hurd') diff --git a/hurd/hurd_types.h b/hurd/hurd_types.h index 288dcc2f..f0521191 100644 --- a/hurd/hurd_types.h +++ b/hurd/hurd_types.h @@ -61,6 +61,7 @@ typedef mach_port_t shutdown_t; typedef char *data_t; typedef const char *const_data_t; typedef char string_t [1024]; +typedef const char *const_string_t; typedef int *intarray_t; typedef const int *const_intarray_t; typedef int *fd_mask_t; -- cgit v1.2.3