Mark some functions and variables as static (#2691)

These are only used in the same file, and not exported.
This commit is contained in:
Kleis Auke Wolthuizen 2022-02-27 14:41:39 +01:00 committed by GitHub
parent dcfac75f06
commit 50a74ceeec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 19 additions and 17 deletions

View File

@ -75,7 +75,7 @@ G_DEFINE_TYPE( VipsLabQ2sRGB, vips_LabQ2sRGB, VIPS_TYPE_COLOUR_CODE );
*
* There's an extra element at the end to let us do a +1 for interpolation.
*/
int vips_Y2v_8[256 + 1];
static int vips_Y2v_8[256 + 1];
/* 8-bit sRGB -> linear lut.
*/
@ -85,7 +85,7 @@ float vips_v2Y_8[256];
*
* There's an extra element at the end to let us do a +1 for interpolation.
*/
int vips_Y2v_16[65536 + 1];
static int vips_Y2v_16[65536 + 1];
/* 16-bit sRGB -> linear lut.
*/

View File

@ -69,7 +69,7 @@
*/
#define QUANT_ELEMENTS (100000)
float cbrt_table[QUANT_ELEMENTS];
static float cbrt_table[QUANT_ELEMENTS];
typedef struct _VipsXYZ2Lab {
VipsColourTransform parent_instance;

View File

@ -206,7 +206,7 @@ vips_col_dE00( float L1, float a1, float b1,
/* Find the difference between two buffers of LAB data.
*/
void
static void
vips_dE00_line( VipsColour *colour,
VipsPel *out, VipsPel **in, int width )
{

View File

@ -208,9 +208,7 @@ void vips__pythagoras_line( VipsColour *colour,
/* Colour tables for Y<->v conversion. Call vips_col_make_tables_RGB_8() and
* vips_col_make_tables_RGB_16() before use to initialize.
*/
extern int vips_Y2v_8[256 + 1];
extern float vips_v2Y_8[256];
extern int vips_Y2v_16[65536 + 1];
extern float vips_v2Y_16[65536];
void vips_col_make_tables_RGB_8( void );

View File

@ -1177,7 +1177,7 @@ static char *scan_property_names[][2] = {
/* Make the xml we write to scan-properties.xml in szi write.
* Free with g_free().
*/
char *
static char *
build_scan_properties( VipsImage *image )
{
VipsDbuf dbuf;

View File

@ -176,10 +176,14 @@ typedef struct heif_error (*libheif_metadata_fn)( struct heif_context *,
const struct heif_image_handle *,
const void *, int );
struct _VipsForeignSaveHeifMetadata {
const char *name;
libheif_metadata_fn saver;
} libheif_metadata[] = {
/* String-based metadata fields we add.
*/
typedef struct _VipsForeignSaveHeifMetadata {
const char *name; /* as understood by libvips */
libheif_metadata_fn saver; /* as understood by libheif */
} VipsForeignSaveHeifMetadata;
static VipsForeignSaveHeifMetadata libheif_metadata[] = {
{ VIPS_META_EXIF_NAME, heif_context_add_exif_metadata },
{ VIPS_META_XMP_NAME, heif_context_add_XMP_metadata }
};

View File

@ -1381,7 +1381,7 @@ vips_image_written( VipsImage *image )
return( result );
}
void
static void
vips_image_invalidate( VipsImage *image )
{
VIPS_DEBUG_MSG( "vips_image_invalidate: %p\n", image );
@ -1421,7 +1421,7 @@ vips_image_invalidate_all( VipsImage *image )
(VipsSListMap2Fn) vips_image_invalidate_all_cb, NULL, NULL );
}
void
static void
vips_image_minimise( VipsImage *image )
{
VIPS_DEBUG_MSG( "vips_image_minimise: %p\n", image );
@ -1681,7 +1681,7 @@ vips_image_set_kill( VipsImage *image, gboolean kill )
/* Fills the given buffer with a temporary filename.
* Assuming that "int" might be 64 Bit wide a buffer size of 26 suffices.
*/
void
static void
vips_image_temp_name( char *name, int size )
{
static int global_serial = 0;

View File

@ -179,7 +179,7 @@ vips_area_free_cb( void *mem, VipsArea *area )
return( 0 );
}
void
static void
vips_area_free( VipsArea *area )
{
if( area->free_fn &&

View File

@ -69,7 +69,7 @@
*/
gboolean vips__vector_enabled = TRUE;
void
static void
vips_vector_error( VipsVector *vector )
{
#ifdef HAVE_ORC

View File

@ -373,7 +373,7 @@ vips_interpolate_nearest_init( VipsInterpolateNearest *nearest )
#endif /*DEBUG*/
}
VipsInterpolate *
static VipsInterpolate *
vips_interpolate_nearest_new( void )
{
return( VIPS_INTERPOLATE( vips_object_new(