Skip to content

Commit bd069ee

Browse files
alavrentievgouriano
authored andcommitted
Workaround GCC14 strange behavior #18
git-svn-id: https://anonsvn.ncbi.nlm.nih.gov/repos/v1/trunk/c++@104597 78c7ea69-d796-4a43-9a09-de51944f1b03
1 parent 8460a2c commit bd069ee

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/connect/ext/test/test_ncbi_dblb.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static char* optarg;
7474
#endif /*NCBI_OS_UNIX*/
7575

7676

77-
static const char kRevision[] = "$Revision: 666428 $";
77+
static const char kRevision[] = "$Revision$";
7878

7979

8080
static const char* s_Progname(const char* prog)
@@ -149,6 +149,7 @@ int main(int argc, char** argv)
149149
int/*bool*/ quiet = 0/*false*/;
150150
const SDBLB_Preference* p = 0;
151151
SDBLB_Preference preference;
152+
const char* const* skip;
152153
EDBLB_Status result;
153154
char hostport[256];
154155
SDBLB_ConnPoint cp;
@@ -209,11 +210,20 @@ int main(int argc, char** argv)
209210
if (n != optind || optind >= argc)
210211
s_Usage(argv[0]);
211212

213+
#ifdef NCBI_COMPILER_GCC
214+
# pragma GCC diagnostic push
215+
# pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
216+
#endif /*NCBI_COMPILER_GCC*/
217+
skip = optind + 1 < argc ? &argv[optind + 1] : 0;
218+
#ifdef NCBI_COMPILER_GCC
219+
# pragma GCC diagnostic pop
220+
#endif /*NCBI_COMPILER_GCC*/
221+
212222
s = DBLB_GetServer
213223
(argv[optind], standby
214224
? fDBLB_AllowFallbackToStandby
215225
: fDBLB_None, p,
216-
optind + 1 < argc ? &argv[optind + 1] : 0, /*NCBI_FAKE_WARNING*/
226+
skip,
217227
&cp, server, sizeof(server),
218228
&result);
219229

0 commit comments

Comments
 (0)