File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -411,10 +411,10 @@ get_icu_locale_comment(const char *localename)
411411Datum
412412pg_import_system_collations (PG_FUNCTION_ARGS )
413413{
414- #if defined(HAVE_LOCALE_T ) && !defined(WIN32 )
415414 bool if_not_exists = PG_GETARG_BOOL (0 );
416415 Oid nspid = PG_GETARG_OID (1 );
417416
417+ #if defined(HAVE_LOCALE_T ) && !defined(WIN32 )
418418 FILE * locale_a_handle ;
419419 char localebuf [NAMEDATALEN ]; /* we assume ASCII so this is fine */
420420 int count = 0 ;
@@ -431,6 +431,12 @@ pg_import_system_collations(PG_FUNCTION_ARGS)
431431 (errcode (ERRCODE_INSUFFICIENT_PRIVILEGE ),
432432 (errmsg ("must be superuser to import system collations" ))));
433433
434+ #if !(defined(HAVE_LOCALE_T ) && !defined(WIN32 )) && !defined(USE_ICU )
435+ /* silence compiler warnings */
436+ (void ) if_not_exists ;
437+ (void ) nspid ;
438+ #endif
439+
434440#if defined(HAVE_LOCALE_T ) && !defined(WIN32 )
435441 locale_a_handle = OpenPipeStream ("locale -a" , "r" );
436442 if (locale_a_handle == NULL )
You can’t perform that action at this time.
0 commit comments