test-tool: fix initiatorname and initiatorname2 issues
gcc-4.6.3 warned about this one on several occasions: gcc -DHAVE_CONFIG_H -I. -I. -I./include "-D_U_=__attribute__((unused))" -I./test-tool -Wall -W -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -ggdb3 -O0 -MT test-tool/bin_iscsi_test-0000_testunitready_simple.o -MD -MP -MF test-tool/.deps/bin_iscsi_test-0000_testunitready_simple.Tpo -c -o test-tool/bin_iscsi_test-0000_testunitready_simple.o `test -f 'test-tool/0000_testunitready_simple.c' || echo './'`test-tool/0000_testunitready_simple.c test-tool/0000_testunitready_simple.c: In function 'T0000_testunitready_simple': test-tool/0000_testunitready_simple.c:23:44: warning: declaration of 'initiator' shadows a global declaration [-Wshadow] test-tool/iscsi-test.h:20:20: warning: shadowed declaration is here [-Wshadow] For now the global initiator is renamed to initiatorname1 (and initiator2 is renamed to initiatorname2, respectively), but ultimately the globals should probably go away. While fixing this it also became apparent that initiator-name-2 was parsed into the "initiator" variable as well. Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
/*
|
||||
/*
|
||||
iscsi-test tool
|
||||
|
||||
Copyright (C) 2010 by Ronnie Sahlberg <ronniesahlberg@gmail.com>
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
extern const char *initiator;
|
||||
extern const char *initiator2;
|
||||
extern const char *initiatorname1;
|
||||
extern const char *initiatorname2;
|
||||
|
||||
struct iscsi_context *iscsi_context_login(const char *initiatorname, const char *url, int *lun);
|
||||
|
||||
@@ -182,4 +182,3 @@ int T1010_datasn_invalid(const char *initiator, const char *url, int data_loss,
|
||||
int T1020_bufferoffset_invalid(const char *initiator, const char *url, int data_loss, int show_info);
|
||||
int T1030_unsolicited_data_overflow(const char *initiator, const char *url, int data_loss, int show_info);
|
||||
int T1031_unsolicited_data_out(const char *initiator, const char *url, int data_loss, int show_info);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user