mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-03 08:00:21 +08:00
Some of our port-specific dynloader implementations are careful to
define pg_dlsym() as returning a PGFunction pointer, not just any pointer-to-function. But many are not. Suppress compiler warnings on platforms that aren't careful by inserting explicit casts at the two call sites that didn't have a cast already. Per Stefan.
This commit is contained in:
parent
706754c16b
commit
292e4c6190
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.94 2007/02/07 00:52:35 petere Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.95 2007/07/12 21:13:27 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -114,7 +114,7 @@ load_external_function(char *filename, char *funcname,
|
||||
*filehandle = lib_handle;
|
||||
|
||||
/* Look up the function within the library */
|
||||
retval = pg_dlsym(lib_handle, funcname);
|
||||
retval = (PGFunction) pg_dlsym(lib_handle, funcname);
|
||||
|
||||
if (retval == NULL && signalNotFound)
|
||||
ereport(ERROR,
|
||||
@ -162,7 +162,7 @@ load_file(const char *filename, bool restricted)
|
||||
PGFunction
|
||||
lookup_external_function(void *filehandle, char *funcname)
|
||||
{
|
||||
return pg_dlsym(filehandle, funcname);
|
||||
return (PGFunction) pg_dlsym(filehandle, funcname);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user