Changeset: 62eb0f527eb5 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/62eb0f527eb5
Modified Files:
common/utils/mstring.h
gdk/gdk_private.h
sql/storage/bat/bat_logger.c
Branch: default
Log Message:
Some more attributes.
diffs (49 lines):
diff --git a/common/utils/mstring.h b/common/utils/mstring.h
--- a/common/utils/mstring.h
+++ b/common/utils/mstring.h
@@ -73,6 +73,7 @@ GCC_Pragma("GCC diagnostic pop")
/* copy the NULL terminated list of src strings with a maximum of n
* bytes to dst; return the combined length of the src strings */
__attribute__((__access__(write_only, 1, 2)))
+__attribute__((__sentinel__))
static inline size_t
strconcat_len(char *restrict dst, size_t n, const char *restrict src, ...)
{
diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h
--- a/gdk/gdk_private.h
+++ b/gdk/gdk_private.h
@@ -135,9 +135,13 @@ gdk_return GDKextendf(int fd, size_t siz
int GDKfdlocate(int farmid, const char *nme, const char *mode, const char *ext)
__attribute__((__visibility__("hidden")));
FILE *GDKfilelocate(int farmid, const char *nme, const char *mode, const char
*ext)
- __attribute__((__visibility__("hidden")));
+ __attribute__((__visibility__("hidden")))
+ __attribute__((__malloc__))
+ __attribute__((__malloc__(fclose, 1)));
FILE *GDKfileopen(int farmid, const char *dir, const char *name, const char
*extension, const char *mode)
- __attribute__((__visibility__("hidden")));
+ __attribute__((__visibility__("hidden")))
+ __attribute__((__malloc__))
+ __attribute__((__malloc__(fclose, 1)));
char *GDKload(int farmid, const char *nme, const char *ext, size_t size,
size_t *maxsize, storage_t mode)
__attribute__((__visibility__("hidden")));
gdk_return GDKmove(int farmid, const char *dir1, const char *nme1, const char
*ext1, const char *dir2, const char *nme2, const char *ext2, bool report)
@@ -264,6 +268,7 @@ BAT *virtualize(BAT *bn)
/* calculate the integer 2 logarithm (i.e. position of highest set
* bit) of the argument (with a slight twist: 0 gives 0, 1 gives 1,
* 0x8 to 0xF give 4, etc.) */
+__attribute__((__const__))
static inline unsigned
ilog2(BUN x)
{
diff --git a/sql/storage/bat/bat_logger.c b/sql/storage/bat/bat_logger.c
--- a/sql/storage/bat/bat_logger.c
+++ b/sql/storage/bat/bat_logger.c
@@ -113,6 +113,7 @@ log_temp_descriptor(log_bid b)
}
#if defined CATALOG_JAN2022 || defined CATALOG_SEP2022
+/* cannot use attribute((sentinel)) since sentinel is not a pointer */
static gdk_return
tabins(logger *lg, ...)
{
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]