Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7f81440

Browse files
committed
Fix unused-variable warning on Windows.
Introduced in585bca3: msgid is not used in the Windows code path.Also adjust comments a tad (mostly to keep pgindent from messing it up).David Rowley
1 parentfc02b87 commit7f81440

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

‎src/interfaces/libpq/fe-connect.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3365,11 +3365,13 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
33653365
intport=LDAP_DEF_PORT,
33663366
scope,
33673367
rc,
3368-
msgid,
33693368
size,
33703369
state,
33713370
oldstate,
33723371
i;
3372+
#ifndefWIN32
3373+
intmsgid;
3374+
#endif
33733375
boolfound_keyword;
33743376
char*url,
33753377
*hostname,
@@ -3514,11 +3516,13 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
35143516

35153517
/*
35163518
* Perform an explicit anonymous bind.
3517-
* LDAP does not require that an anonymous bind is preformed explicitly,
3519+
*
3520+
* LDAP does not require that an anonymous bind is performed explicitly,
35183521
* but we want to distinguish between the case where LDAP bind does not
35193522
* succeed within PGLDAP_TIMEOUT seconds (return 2 to continue parsing
35203523
* the service control file) and the case where querying the LDAP server
35213524
* fails (return 1 to end parsing).
3525+
*
35223526
* Unfortunately there is no way of setting a timeout that works for
35233527
* both Windows and OpenLDAP.
35243528
*/
@@ -3531,7 +3535,7 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
35313535
ldap_unbind(ld);
35323536
return2;
35333537
}
3534-
#else/* WIN32 */
3538+
#else/*!WIN32 */
35353539
/* in OpenLDAP, use the LDAP_OPT_NETWORK_TIMEOUT option */
35363540
if (ldap_set_option(ld,LDAP_OPT_NETWORK_TIMEOUT,&time)!=LDAP_SUCCESS)
35373541
{
@@ -3786,7 +3790,8 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
37863790

37873791
return0;
37883792
}
3789-
#endif
3793+
3794+
#endif/* USE_LDAP */
37903795

37913796
#defineMAXBUFSIZE 256
37923797

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp