Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Quiet warnings

Campbell Barton5cfa87744990
diff --git a/toonz/sources/common/tiio/bmp/filebmp.c b/toonz/sources/common/tiio/bmp/filebmp.c
index dcffcb8b3..e9ea2ab47 100644
--- a/toonz/sources/common/tiio/bmp/filebmp.c
+++ b/toonz/sources/common/tiio/bmp/filebmp.c
@@ -93,25 +93,7 @@
/*---------------------------------------------------------------------------*/
/*-- Prototypes -------------------------------------------------------------*/
-int load_bmp_header(FILE *fp, BMP_HEADER **pHd);
-int write_bmp_header(FILE *fp, BMP_HEADER *hd);
-void release_bmp_header(BMP_HEADER *hd);
-
-int write_bmp_palette(FILE *fp, int nc, UCHAR *b, UCHAR *g, UCHAR *r);
-
-int make_bmp_palette(int colors, int grey, UCHAR *r, UCHAR *g, UCHAR *b);
-
-BMP_SUBTYPE bmp_get_colorstyle(IMAGE *img);
-
-int error_checking_bmp(BMP_HEADER *hd);
-
-int read_bmp_line(FILE *fp, void *line, UINT w, UINT h, UCHAR **map,
- BMP_SUBTYPE type);
-
-int write_bmp_line(FILE *fp, void *line_buffer, UINT w, UINT row, UCHAR *map,
- BMP_SUBTYPE type);
-
-int skip_bmp_lines(FILE *fp, UINT w, UINT rows, int whence, BMP_SUBTYPE type);
+static BMP_SUBTYPE bmp_get_colorstyle(IMAGE *img);
/*---------------------------------------------------------------------------*/
/*-- Local Prototypes -------------------------------------------------------*/
@@ -1633,7 +1615,7 @@ int write_bmp_palette(FILE *fp, int nc, UCHAR *b, UCHAR *g, UCHAR *r)
#ifndef __LIBSIMAGE__
/*---------------------------------------------------------------------------*/
-int img_write_bmp(const MYSTRING fname, IMAGE *img)
+static int img_write_bmp(const MYSTRING fname, IMAGE *img)
/*---------------------------------------------------------------------------*/
{
int (*write_function)(FILE * fp, UCHAR * pic, UINT w, UINT h, UCHAR * map);
diff --git a/toonz/sources/common/tvectorimage/tsweepboundary.cpp b/toonz/sources/common/tvectorimage/tsweepboundary.cpp
index 315e0d885..0d4ce934c 100644
--- a/toonz/sources/common/tvectorimage/tsweepboundary.cpp
+++ b/toonz/sources/common/tvectorimage/tsweepboundary.cpp
@@ -64,7 +64,7 @@ typedef enum Direction {
outward = 1,
deletedInward = 2,
deletedOutward = 3
-};
+} Direction;
/*
class CompareOutlines {
diff --git a/toonz/sources/common/twain/ttwain_state.c b/toonz/sources/common/twain/ttwain_state.c
index 6e5ed8ecc..141218e1a 100644
--- a/toonz/sources/common/twain/ttwain_state.c
+++ b/toonz/sources/common/twain/ttwain_state.c
@@ -550,7 +550,7 @@ static int TTWAIN_DoOneTransfer(void) {
return rc;
}
/*---------------------------------------------------------------------------*/
-void TTWAIN_RegisterApp(
+static void TTWAIN_RegisterApp(
int majorNum, int minorNum, /* app. revision*/
int nLanguage, /* (human) language (use TWLG_xxx from TWAIN.H) */
int nCountry, /* country (use TWCY_xxx from TWAIN.H) */
diff --git a/toonz/sources/image/quantel/filequantel.c b/toonz/sources/image/quantel/filequantel.c
index 9159d1438..250c0e553 100644
--- a/toonz/sources/image/quantel/filequantel.c
+++ b/toonz/sources/image/quantel/filequantel.c
@@ -88,7 +88,7 @@ static IMAGE *img_read_region_quantel_interlaced(T_CHAR *fname, int x1, int y1,
/*---------------------------------------------------------------------------*/
-static void vpb_string(char *str, int field_type, char **p_h, char *stop) {
+static void vpb_string(const char *str, int field_type, char **p_h, char *stop) {
char *h;
int len;
@@ -536,8 +536,8 @@ int img_write_quantel(const T_CHAR *fname, void *buffer, int w, int h,
/*---------------------------------------------------------------------------*/
-IMAGE *img_read_region_quantel(T_CHAR *fname, int x1, int y1, int x2, int y2,
- int scale, int type) {
+static IMAGE *img_read_region_quantel(T_CHAR *fname, int x1, int y1, int x2, int y2,
+ int scale, int type) {
if (type == SDL_FORMAT)
return (img_read_region_quantel_no_interlaced(fname, x1, y1, x2, y2, scale,
type));
diff --git a/toonz/sources/image/tzp/avl.c b/toonz/sources/image/tzp/avl.c
index 8f974d34e..1a7e1e78d 100644
--- a/toonz/sources/image/tzp/avl.c
+++ b/toonz/sources/image/tzp/avl.c
@@ -1841,7 +1841,7 @@ typedef struct {
CDB_PARAM *param;
} CDB_EFFECT;
-char *strsave(const char *str) {
+static char *strsave(const char *str) {
char *neww;
if (!str) return 0;
neww = malloc(strlen(str) + 1);
@@ -1852,7 +1852,7 @@ char *strsave(const char *str) {
/*---------------------------------------------------------------------------*/
-char *strnsave(const char *str, int n) {
+static char *strnsave(const char *str, int n) {
char *neww;
neww = malloc(n + 1);