summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2023-03-09 21:15:39 +0100
committerGitHub <noreply@github.com>2023-03-09 21:15:39 +0100
commit15c0dca5206d0101de2ce73b97138a2b26949011 (patch)
tree229102c5ce1f56d31007ce5db8da4bc47c0ec8f7 /src/lib
parentfbdf28a282cce8e4ba9d6a5d8c2a3332e20f3bb9 (diff)
parenteb8a7e44279415fdefda6d980b99bd7e00c41da0 (diff)
Merge pull request #1462 from sebras/master
CMake: error out on warnings for strict/missing prototypes.
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 354415df..6f98d609 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;