summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2023-03-09 19:20:58 +0100
committerSebastian Rasmussen <sebras@gmail.com>2023-03-09 20:09:27 +0100
commiteb8a7e44279415fdefda6d980b99bd7e00c41da0 (patch)
treeeb807e6704df2b72424ef5d4f56211855c281e38 /src/lib
parent1a8d13e2c51cc59507b361a9c0d1cf51201f7d02 (diff)
CMake: error out on warnings for strict/missing prototypes.
And fix strict-prototypes/missing-prototypes warnings.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/openjp2/ht_dec.c20
-rw-r--r--src/lib/openjp2/j2k.c2
-rw-r--r--src/lib/openjp2/openjpeg.c5
-rw-r--r--src/lib/openjp2/thread.c2
4 files changed, 27 insertions, 2 deletions
diff --git a/src/lib/openjp2/ht_dec.c b/src/lib/openjp2/ht_dec.c
index 62a6c9e1..120d7e49 100644
--- a/src/lib/openjp2/ht_dec.c
+++ b/src/lib/openjp2/ht_dec.c
@@ -1083,6 +1083,26 @@ static OPJ_BOOL opj_t1_allocate_buffers(
return OPJ_TRUE;
}
+/**
+Decode 1 HT code-block
+@param t1 T1 handle
+@param cblk Code-block coding parameters
+@param orient
+@param roishift Region of interest shifting value
+@param cblksty Code-block style
+@param p_manager the event manager
+@param p_manager_mutex mutex for the event manager
+@param check_pterm whether PTERM correct termination should be checked
+*/
+OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
+ opj_tcd_cblk_dec_t* cblk,
+ OPJ_UINT32 orient,
+ OPJ_UINT32 roishift,
+ OPJ_UINT32 cblksty,
+ opj_event_mgr_t *p_manager,
+ opj_mutex_t* p_manager_mutex,
+ OPJ_BOOL check_pterm);
+
//************************************************************************/
/** @brief Decodes one codeblock, processing the cleanup, siginificance
* propagation, and magnitude refinement pass
diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c
index 923bd891..b02539fa 100644
--- a/src/lib/openjp2/j2k.c
+++ b/src/lib/openjp2/j2k.c
@@ -6726,7 +6726,7 @@ OPJ_BOOL opj_j2k_set_threads(opj_j2k_t *j2k, OPJ_UINT32 num_threads)
return OPJ_FALSE;
}
-static int opj_j2k_get_default_thread_count()
+static int opj_j2k_get_default_thread_count(void)
{
const char* num_threads_str = getenv("OPJ_NUM_THREADS");
int num_cpus;
diff --git a/src/lib/openjp2/openjpeg.c b/src/lib/openjp2/openjpeg.c
index 29d3ee52..34f4fd19 100644
--- a/src/lib/openjp2/openjpeg.c
+++ b/src/lib/openjp2/openjpeg.c
@@ -144,6 +144,11 @@ static void opj_close_from_file(void* p_user_data)
/* ---------------------------------------------------------------------- */
#ifdef _WIN32
#ifndef OPJ_STATIC
+
+/* declaration to avoid warning: no previous prototype for 'DllMain' */
+BOOL APIENTRY
+DllMain(HINSTANCE hModule, DWORD ul_reason_for_call, LPVOID lpReserved);
+
BOOL APIENTRY
DllMain(HINSTANCE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
diff --git a/src/lib/openjp2/thread.c b/src/lib/openjp2/thread.c
index f2fca2ee..240810b1 100644
--- a/src/lib/openjp2/thread.c
+++ b/src/lib/openjp2/thread.c
@@ -221,7 +221,7 @@ struct opj_thread_t {
HANDLE hThread;
};
-unsigned int __stdcall opj_thread_callback_adapter(void *info)
+static unsigned int __stdcall opj_thread_callback_adapter(void *info)
{
opj_thread_t* thread = (opj_thread_t*) info;
HANDLE hEvent = NULL;