mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[freerdp] mark all WINPR_ATTR_MALLOC also nodiscard
This commit is contained in:
5
libfreerdp/cache/bitmap.h
vendored
5
libfreerdp/cache/bitmap.h
vendored
@@ -60,17 +60,20 @@ extern "C"
|
||||
FREERDP_LOCAL void bitmap_cache_free(rdpBitmapCache* bitmap_cache);
|
||||
|
||||
WINPR_ATTR_MALLOC(bitmap_cache_free, 1)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL rdpBitmapCache* bitmap_cache_new(rdpContext* context);
|
||||
|
||||
FREERDP_LOCAL void free_bitmap_update(rdpContext* context, BITMAP_UPDATE* pointer);
|
||||
|
||||
WINPR_ATTR_MALLOC(free_bitmap_update, 2)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL BITMAP_UPDATE* copy_bitmap_update(rdpContext* context,
|
||||
const BITMAP_UPDATE* pointer);
|
||||
|
||||
FREERDP_LOCAL void free_cache_bitmap_order(rdpContext* context, CACHE_BITMAP_ORDER* order);
|
||||
|
||||
WINPR_ATTR_MALLOC(free_cache_bitmap_order, 2)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL CACHE_BITMAP_ORDER* copy_cache_bitmap_order(rdpContext* context,
|
||||
const CACHE_BITMAP_ORDER* order);
|
||||
|
||||
@@ -78,6 +81,7 @@ extern "C"
|
||||
CACHE_BITMAP_V2_ORDER* order);
|
||||
|
||||
WINPR_ATTR_MALLOC(free_cache_bitmap_v2_order, 2)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL CACHE_BITMAP_V2_ORDER*
|
||||
copy_cache_bitmap_v2_order(rdpContext* context, const CACHE_BITMAP_V2_ORDER* order);
|
||||
|
||||
@@ -85,6 +89,7 @@ extern "C"
|
||||
CACHE_BITMAP_V3_ORDER* order);
|
||||
|
||||
WINPR_ATTR_MALLOC(free_cache_bitmap_v3_order, 2)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL CACHE_BITMAP_V3_ORDER*
|
||||
copy_cache_bitmap_v3_order(rdpContext* context, const CACHE_BITMAP_V3_ORDER* order);
|
||||
|
||||
|
||||
2
libfreerdp/cache/brush.h
vendored
2
libfreerdp/cache/brush.h
vendored
@@ -42,11 +42,13 @@ extern "C"
|
||||
FREERDP_LOCAL void brush_cache_free(rdpBrushCache* brush);
|
||||
|
||||
WINPR_ATTR_MALLOC(brush_cache_free, 1)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL rdpBrushCache* brush_cache_new(rdpContext* context);
|
||||
|
||||
FREERDP_LOCAL void free_cache_brush_order(rdpContext* context, CACHE_BRUSH_ORDER* order);
|
||||
|
||||
WINPR_ATTR_MALLOC(free_cache_brush_order, 1)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL CACHE_BRUSH_ORDER* copy_cache_brush_order(rdpContext* context,
|
||||
const CACHE_BRUSH_ORDER* order);
|
||||
|
||||
|
||||
3
libfreerdp/cache/cache.h
vendored
3
libfreerdp/cache/cache.h
vendored
@@ -51,18 +51,21 @@ extern "C"
|
||||
FREERDP_LOCAL void cache_free(rdpCache* cache);
|
||||
|
||||
WINPR_ATTR_MALLOC(cache_free, 1)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL rdpCache* cache_new(rdpContext* context);
|
||||
|
||||
FREERDP_LOCAL void free_cache_color_table_order(rdpContext* context,
|
||||
CACHE_COLOR_TABLE_ORDER* order);
|
||||
|
||||
WINPR_ATTR_MALLOC(free_cache_color_table_order, 2)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL CACHE_COLOR_TABLE_ORDER*
|
||||
copy_cache_color_table_order(rdpContext* context, const CACHE_COLOR_TABLE_ORDER* order);
|
||||
|
||||
FREERDP_LOCAL void free_surface_bits_command(rdpContext* context, SURFACE_BITS_COMMAND* order);
|
||||
|
||||
WINPR_ATTR_MALLOC(free_surface_bits_command, 2)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL SURFACE_BITS_COMMAND*
|
||||
copy_surface_bits_command(rdpContext* context, const SURFACE_BITS_COMMAND* order);
|
||||
|
||||
|
||||
13
libfreerdp/cache/glyph.h
vendored
13
libfreerdp/cache/glyph.h
vendored
@@ -61,15 +61,22 @@ extern "C"
|
||||
FREERDP_LOCAL void glyph_cache_free(rdpGlyphCache* glyph);
|
||||
|
||||
WINPR_ATTR_MALLOC(glyph_cache_free, 1)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL rdpGlyphCache* glyph_cache_new(rdpContext* context);
|
||||
|
||||
FREERDP_LOCAL CACHE_GLYPH_ORDER* copy_cache_glyph_order(rdpContext* context,
|
||||
const CACHE_GLYPH_ORDER* glyph);
|
||||
FREERDP_LOCAL void free_cache_glyph_order(rdpContext* context, CACHE_GLYPH_ORDER* glyph);
|
||||
|
||||
WINPR_ATTR_MALLOC(free_cache_glyph_order, 1)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL CACHE_GLYPH_ORDER* copy_cache_glyph_order(rdpContext* context,
|
||||
const CACHE_GLYPH_ORDER* glyph);
|
||||
|
||||
FREERDP_LOCAL void free_cache_glyph_v2_order(rdpContext* context, CACHE_GLYPH_V2_ORDER* glyph);
|
||||
|
||||
WINPR_ATTR_MALLOC(free_cache_glyph_v2_order, 1)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL CACHE_GLYPH_V2_ORDER*
|
||||
copy_cache_glyph_v2_order(rdpContext* context, const CACHE_GLYPH_V2_ORDER* glyph);
|
||||
FREERDP_LOCAL void free_cache_glyph_v2_order(rdpContext* context, CACHE_GLYPH_V2_ORDER* glyph);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
1
libfreerdp/cache/nine_grid.h
vendored
1
libfreerdp/cache/nine_grid.h
vendored
@@ -41,6 +41,7 @@ extern "C"
|
||||
FREERDP_LOCAL void nine_grid_cache_free(rdpNineGridCache* nine_grid);
|
||||
|
||||
WINPR_ATTR_MALLOC(nine_grid_cache_free, 1)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL rdpNineGridCache* nine_grid_cache_new(rdpContext* context);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
2
libfreerdp/cache/offscreen.h
vendored
2
libfreerdp/cache/offscreen.h
vendored
@@ -34,6 +34,7 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL rdpBitmap* offscreen_cache_get(rdpOffscreenCache* offscreen_cache, UINT32 index);
|
||||
|
||||
FREERDP_LOCAL void offscreen_cache_register_callbacks(rdpUpdate* update);
|
||||
@@ -41,6 +42,7 @@ extern "C"
|
||||
FREERDP_LOCAL void offscreen_cache_free(rdpOffscreenCache* offscreen);
|
||||
|
||||
WINPR_ATTR_MALLOC(offscreen_cache_free, 1)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL rdpOffscreenCache* offscreen_cache_new(rdpContext* context);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
2
libfreerdp/cache/palette.h
vendored
2
libfreerdp/cache/palette.h
vendored
@@ -50,11 +50,13 @@ extern "C"
|
||||
FREERDP_LOCAL void palette_cache_free(rdpPaletteCache* palette_cache);
|
||||
|
||||
WINPR_ATTR_MALLOC(palette_cache_free, 1)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL rdpPaletteCache* palette_cache_new(rdpContext* context);
|
||||
|
||||
FREERDP_LOCAL void free_palette_update(rdpContext* context, PALETTE_UPDATE* pointer);
|
||||
|
||||
WINPR_ATTR_MALLOC(free_palette_update, 2)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL PALETTE_UPDATE* copy_palette_update(rdpContext* context,
|
||||
const PALETTE_UPDATE* pointer);
|
||||
|
||||
|
||||
7
libfreerdp/cache/pointer.h
vendored
7
libfreerdp/cache/pointer.h
vendored
@@ -45,12 +45,14 @@ extern "C"
|
||||
FREERDP_LOCAL void pointer_cache_free(rdpPointerCache* pointer_cache);
|
||||
|
||||
WINPR_ATTR_MALLOC(pointer_cache_free, 1)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL rdpPointerCache* pointer_cache_new(rdpContext* context);
|
||||
|
||||
FREERDP_LOCAL void free_pointer_color_update(rdpContext* context,
|
||||
POINTER_COLOR_UPDATE* pointer);
|
||||
|
||||
WINPR_ATTR_MALLOC(free_pointer_color_update, 1)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL POINTER_COLOR_UPDATE*
|
||||
copy_pointer_color_update(rdpContext* context, const POINTER_COLOR_UPDATE* pointer);
|
||||
|
||||
@@ -58,12 +60,14 @@ extern "C"
|
||||
POINTER_LARGE_UPDATE* pointer);
|
||||
|
||||
WINPR_ATTR_MALLOC(free_pointer_large_update, 1)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL POINTER_LARGE_UPDATE*
|
||||
copy_pointer_large_update(rdpContext* context, const POINTER_LARGE_UPDATE* pointer);
|
||||
|
||||
FREERDP_LOCAL void free_pointer_new_update(rdpContext* context, POINTER_NEW_UPDATE* pointer);
|
||||
|
||||
WINPR_ATTR_MALLOC(free_pointer_new_update, 1)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL POINTER_NEW_UPDATE* copy_pointer_new_update(rdpContext* context,
|
||||
const POINTER_NEW_UPDATE* pointer);
|
||||
|
||||
@@ -71,6 +75,7 @@ extern "C"
|
||||
POINTER_CACHED_UPDATE* pointer);
|
||||
|
||||
WINPR_ATTR_MALLOC(free_pointer_cached_update, 1)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL POINTER_CACHED_UPDATE*
|
||||
copy_pointer_cached_update(rdpContext* context, const POINTER_CACHED_UPDATE* pointer);
|
||||
|
||||
@@ -78,6 +83,7 @@ extern "C"
|
||||
POINTER_POSITION_UPDATE* pointer);
|
||||
|
||||
WINPR_ATTR_MALLOC(free_pointer_position_update, 1)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL POINTER_POSITION_UPDATE*
|
||||
copy_pointer_position_update(rdpContext* context, const POINTER_POSITION_UPDATE* pointer);
|
||||
|
||||
@@ -85,6 +91,7 @@ extern "C"
|
||||
POINTER_SYSTEM_UPDATE* pointer);
|
||||
|
||||
WINPR_ATTR_MALLOC(free_pointer_system_update, 1)
|
||||
WINPR_ATTR_NODISCARD
|
||||
FREERDP_LOCAL POINTER_SYSTEM_UPDATE*
|
||||
copy_pointer_system_update(rdpContext* context, const POINTER_SYSTEM_UPDATE* pointer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user