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

Commit0156315

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 parent9fe5525 commit0156315

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
@@ -3362,11 +3362,13 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
33623362
intport=LDAP_DEF_PORT,
33633363
scope,
33643364
rc,
3365-
msgid,
33663365
size,
33673366
state,
33683367
oldstate,
33693368
i;
3369+
#ifndefWIN32
3370+
intmsgid;
3371+
#endif
33703372
boolfound_keyword;
33713373
char*url,
33723374
*hostname,
@@ -3511,11 +3513,13 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
35113513

35123514
/*
35133515
* Perform an explicit anonymous bind.
3514-
* LDAP does not require that an anonymous bind is preformed explicitly,
3516+
*
3517+
* LDAP does not require that an anonymous bind is performed explicitly,
35153518
* but we want to distinguish between the case where LDAP bind does not
35163519
* succeed within PGLDAP_TIMEOUT seconds (return 2 to continue parsing
35173520
* the service control file) and the case where querying the LDAP server
35183521
* fails (return 1 to end parsing).
3522+
*
35193523
* Unfortunately there is no way of setting a timeout that works for
35203524
* both Windows and OpenLDAP.
35213525
*/
@@ -3528,7 +3532,7 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
35283532
ldap_unbind(ld);
35293533
return2;
35303534
}
3531-
#else/* WIN32 */
3535+
#else/*!WIN32 */
35323536
/* in OpenLDAP, use the LDAP_OPT_NETWORK_TIMEOUT option */
35333537
if (ldap_set_option(ld,LDAP_OPT_NETWORK_TIMEOUT,&time)!=LDAP_SUCCESS)
35343538
{
@@ -3783,7 +3787,8 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options,
37833787

37843788
return0;
37853789
}
3786-
#endif
3790+
3791+
#endif/* USE_LDAP */
37873792

37883793
#defineMAXBUFSIZE 256
37893794

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp