Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some compiler and doxygen warnings #179

Merged
merged 1 commit into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/source/configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AC_PREREQ([2.60])
AC_INIT([globus_common], [18.11], [https://github.com/gridcf/gct/issues])
AC_INIT([globus_common], [18.12], [https://github.com/gridcf/gct/issues])
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST([MAJOR_VERSION], [${PACKAGE_VERSION%%.*}])
AC_SUBST([MINOR_VERSION], [${PACKAGE_VERSION##*.}])
Expand Down
2 changes: 1 addition & 1 deletion common/source/library/globus_args.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ globus_l_args_create_error_msg( char ** error_msg,
usage_len = strlen( oneline_usage );

len = strlen(p);
strncpy( &p[len], oneline_usage, usage_len );
memcpy( &p[len], oneline_usage, usage_len );
fscheiner marked this conversation as resolved.
Show resolved Hide resolved
sprintf( &p[len+usage_len], "%s", error_epilogue );

if (error_msg)
Expand Down
6 changes: 0 additions & 6 deletions common/source/library/globus_callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,6 @@ typedef struct globus_l_callback_space_attr_s * globus_callback_space_attr_t;
* @param user_arg
* The user argument registered with this callback
*
* @return
* - void
*
* @see globus_callback_space_register_oneshot()
* @see globus_callback_space_register_periodic()
* @see globus_thread_blocking_space_will_block()
Expand Down Expand Up @@ -576,9 +573,6 @@ globus_callback_adjust_period(
* The callback space to poll. Note: regardless of what space is passed
* here, the 'global' space is also always polled.
*
* @return
* - void
*
* @see globus_callback_spaces
* @see globus_condattr_setspace()
*/
Expand Down
1 change: 0 additions & 1 deletion common/source/library/globus_error_errno.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ int
globus_error_errno_search(
globus_object_t * error)
{
globus_module_descriptor_t * source_module;
int current_errno;

if(error == NULL)
Expand Down
1 change: 1 addition & 0 deletions common/source/library/globus_libc.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ globus_libc_gethostname(char *name, int len)
(env = getenv("GLOBUS_HOSTNAME")) != GLOBUS_NULL)
{
strncpy(hostname, env, MAXHOSTNAMELEN);
hostname[MAXHOSTNAMELEN - 1] = '\0';
hostname_length = strlen(hostname);
}
#endif
Expand Down
9 changes: 1 addition & 8 deletions common/source/library/globus_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,7 @@ globus_l_alphabetize_list(
}
else if ((!e1->short_opt) && (!e2->short_opt))
{
if (globus_libc_strncasecmp(e1->short_opt, e2->short_opt, strlen(e1->short_opt)) <= 0)
{
return GLOBUS_TRUE;
}
else
{
return GLOBUS_FALSE;
}
return GLOBUS_TRUE;
fscheiner marked this conversation as resolved.
Show resolved Hide resolved
}
else if (globus_libc_strncasecmp(e1->short_opt, e2->short_opt, strlen(e1->short_opt)) <= 0)
{
Expand Down
2 changes: 1 addition & 1 deletion common/source/library/globus_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -1546,7 +1546,7 @@ globus_thread_self(void)
* @param thread2
* Thread identifier to compare.
* @retval GLOBUS_TRUE thread1 and thread2 refer to the same thread.
* @retval GLOBUS_TRUE thread1 and thread2 do not refer to the same thread.
* @retval GLOBUS_FALSE thread1 and thread2 do not refer to the same thread.
*/
globus_bool_t
globus_thread_equal(
Expand Down
2 changes: 0 additions & 2 deletions common/source/test/error_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ main()
char *errstring;
globus_object_t *error,
*error2;
const globus_object_type_t *type;
int j;

error = globus_error_get(result);
ok(error != NULL, "error_get_%d", i);
Expand Down
6 changes: 2 additions & 4 deletions common/source/test/fifo_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,10 @@ int fifo_test(void)
globus_fifo_t currentFifo;
globus_fifo_t *newFifoPtr;
globus_fifo_t relocatedFifo;
int rc;
int numOfItems;
int *middleItem;
int *middleItem = NULL;
int middleIndex;
int *copyData;
int errorsOccurred = 0;

printf("1..42\n");
numOfItems = 8;
Expand Down Expand Up @@ -103,7 +101,7 @@ int fifo_test(void)
/* remove an item in the middle */
ok((data = (int *)globus_fifo_remove(&currentFifo, middleItem)) != NULL,
"remove_middle_item");
ok(data && (*data == *middleItem), "middle_value_check");
ok(data && middleItem && (*data == *middleItem), "middle_value_check");

/* remove an item at the beginning */
ok((data = globus_fifo_dequeue(&currentFifo)) != NULL, "fifo_dequeue");
Expand Down
2 changes: 0 additions & 2 deletions common/source/test/globus_args_scan_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,6 @@ static char * testhnfail[] = {
int
main(int argc, char *argv[])
{
int i = 1;

globus_module_activate(GLOBUS_COMMON_MODULE);

printf("1..13\n");
Expand Down
1 change: 0 additions & 1 deletion common/source/test/memory_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ int dump(globus_byte_t * buf, int size)
int ctr;
int col = 0;
int failed=0;
const char *p = reference_output;

for(ctr = 0; ctr < size; ctr++)
{
Expand Down
3 changes: 1 addition & 2 deletions common/source/test/module_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ module_test(void)
void * mod_pointer;
const char *name="GLOBUS_ENV_TEST_VAR";
char * value1 = "value1";
int successful_tests=0;


printf("1..16\n");
Expand Down Expand Up @@ -142,7 +141,7 @@ module_test(void)
* Activate a module with globus_module_activate()
*/
rc = globus_module_activate(&module1);
ok(rc == GLOBUS_SUCCESS &
ok(rc == GLOBUS_SUCCESS &&
active_modules[0] == 1 &&
active_modules[1] == 1 &&
active_modules[2] == 1, "activate_module1");
Expand Down
2 changes: 0 additions & 2 deletions common/source/test/poll_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ adjust_period_set_infinity_callback(
int
main(int argc, char *argv[])
{
int tests_passed = 0;
int ctr;

for (ctr = 0; ctr < argc; ctr++)
Expand Down Expand Up @@ -809,7 +808,6 @@ cancel_test()
void
verbose_printf(int level, char *s,...)
{
char tmp[1023];
va_list ap;


Expand Down
1 change: 0 additions & 1 deletion common/source/test/timedwait_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ int
timedwait_test(void)
{
int i;
int successful_tests=0;
globus_reltime_t delay_time;
/* Test definitions:
* time when signal function should be called,
Expand Down
2 changes: 1 addition & 1 deletion gass/copy/source/configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_PREREQ([2.60])

AC_INIT([globus_gass_copy],[10.11],[https://github.com/gridcf/gct/issues])
AC_INIT([globus_gass_copy],[10.12],[https://github.com/gridcf/gct/issues])
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST([MAJOR_VERSION], [${PACKAGE_VERSION%%.*}])
AC_SUBST([MINOR_VERSION], [${PACKAGE_VERSION##*.}])
Expand Down
2 changes: 1 addition & 1 deletion gass/copy/source/globus_gass_copy.h
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ typedef struct
* The full url to the expanded entry. A directory entry will end
* in a forward slash '/'.
*
* @param stat
* @param info_stat
* A pointer to a globus_gass_copy_glob_stat_t containing information
* about the entry.
*
Expand Down
4 changes: 1 addition & 3 deletions gass/copy/source/globus_gass_copy_glob.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ globus_l_gass_copy_glob_expand_ftp_url(

info->base_url = globus_libc_strdup(info->url);
tmp = strrchr(info->base_url, '/');
if(tmp == GLOBUS_NULL || tmp == '\0')
if(tmp == GLOBUS_NULL || *tmp == '\0')
{
result = globus_error_put(
globus_error_construct_string(
Expand Down Expand Up @@ -942,7 +942,6 @@ globus_l_gass_copy_glob_parse_mlst_line(
globus_result_t result;
int i;
char * space;
char * filename;
char * startline;
char * startfact;
char * endfact;
Expand Down Expand Up @@ -970,7 +969,6 @@ globus_l_gass_copy_glob_parse_mlst_line(
goto error_invalid_mlsd;
}
*space = '\0';
filename = space + 1;
startfact = startline;

while(startfact != space)
Expand Down
8 changes: 4 additions & 4 deletions gass/copy/source/globus_url_copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -3477,16 +3477,16 @@ guc_l_pipe_to_stack_str(
found = GLOBUS_FALSE;
while(!found)
{
if(strchr(in_str, *del) == NULL)
if(strchr(in_str, *del) != NULL)
{
found = GLOBUS_TRUE;
}
else
{
del++;
if(del == '\0')
if(*del == '\0')
{
fprintf(stderr, "The pipe string most contain at least one of the following characters: %s", del_choices);
fprintf(stderr, "The pipe string must contain at least one of the following characters: %s", del_choices);
return NULL;
}
}
Expand Down Expand Up @@ -3759,7 +3759,7 @@ globus_l_guc_parse_arguments(
{
*tmp_str = '\0';
tmp_str++;
if(tmp_str == '\0')
if(*tmp_str == '\0')
{
tmp_str = NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion gass/server_ez/source/configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_PREREQ([2.60])

AC_INIT([globus_gass_server_ez],[6.1],[https://github.com/gridcf/gct/issues])
AC_INIT([globus_gass_server_ez],[6.2],[https://github.com/gridcf/gct/issues])
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST([MAJOR_VERSION], [${PACKAGE_VERSION%%.*}])
AC_SUBST([MINOR_VERSION], [${PACKAGE_VERSION##*.}])
Expand Down
6 changes: 1 addition & 5 deletions gass/server_ez/source/globus_gass_server_ez.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ globus_l_gass_server_ez_register_accept_callback(
)
{
int rc;
char * subjectname;
char * path=NULL;
FILE *fp;
char * url;
Expand All @@ -358,13 +357,10 @@ globus_l_gass_server_ez_register_accept_callback(
struct stat statstruct;
globus_byte_t * buf;
int amt;
const char *flags;
const char *flags = "";
size_t length;
uintptr_t buffer_size;


subjectname=globus_gass_transfer_request_get_subject(request);

globus_l_gass_server_ez_enter();
/* lookup our options */
s = globus_hashtable_lookup(&globus_l_gass_server_ez_listeners, listener);
Expand Down
2 changes: 1 addition & 1 deletion gass/transfer/source/configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_PREREQ([2.60])

AC_INIT([globus_gass_transfer],[9.3],[https://github.com/gridcf/gct/issues])
AC_INIT([globus_gass_transfer],[9.4],[https://github.com/gridcf/gct/issues])
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST([MAJOR_VERSION], [${PACKAGE_VERSION%%.*}])
AC_SUBST([MINOR_VERSION], [${PACKAGE_VERSION##*.}])
Expand Down
2 changes: 1 addition & 1 deletion gass/transfer/source/library/globus_gass_transfer_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -2044,7 +2044,7 @@ globus_l_gass_transfer_http_authorization_callback(
gss_ctx_id_t context_handle)
{
globus_gass_transfer_http_listener_proto_t *proto;
int rc;
int rc = GLOBUS_FALSE;
MYNAME(globus_l_gass_transfer_http_authorization_callback);

debug_printf(3, (_GTSL("Entering %s()\n"),myname));
Expand Down
2 changes: 1 addition & 1 deletion gass/transfer/source/library/globus_gass_transfer_proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ typedef void
globus_gass_transfer_request_proto_t * proto,
globus_gass_transfer_request_t request,
globus_byte_t * bytes,
globus_size_t send_length,
globus_size_t bytes_length,
globus_bool_t last_data);

/**
Expand Down
2 changes: 1 addition & 1 deletion gram/client/source/configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_PREREQ([2.60])

AC_INIT([globus_gram_client],[14.5],[https://github.com/gridcf/gct/issues])
AC_INIT([globus_gram_client],[14.6],[https://github.com/gridcf/gct/issues])
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST([MAJOR_VERSION], [${PACKAGE_VERSION%%.*}])
AC_SUBST([MINOR_VERSION], [${PACKAGE_VERSION##*.}])
Expand Down
2 changes: 0 additions & 2 deletions gram/client/source/globus_gram_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,6 @@ globus_i_gram_client_deactivate(void)
* of the information printed by this debugging system is related to errors
* that occur during GRAM Client API functions. The messages printed to
* standard output are not structured in any way.
*
* @return void
*/
void
globus_gram_client_debug(void)
Expand Down
2 changes: 1 addition & 1 deletion gram/client_tools/source/configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_PREREQ([2.60])

AC_INIT([globus_gram_client_tools],[12.1],[https://github.com/gridcf/gct/issues])
AC_INIT([globus_gram_client_tools],[12.2],[https://github.com/gridcf/gct/issues])
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST([MAJOR_VERSION], [${PACKAGE_VERSION%%.*}])
AC_SUBST([MINOR_VERSION], [${PACKAGE_VERSION##*.}])
Expand Down
2 changes: 0 additions & 2 deletions gram/client_tools/source/globusrun.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ main(int argc, char* argv[])
char * request_file = NULL;
char * rm_contact = NULL;
char * program = NULL;
globus_bool_t ignore_ctrlc = GLOBUS_FALSE;
globus_rsl_t * request_ast = NULL;
globus_list_t * options_found = NULL;
globus_list_t * list = NULL;
Expand Down Expand Up @@ -467,7 +466,6 @@ main(int argc, char* argv[])

case arg_n:
options |= GLOBUSRUN_ARG_IGNORE_CTRLC;
ignore_ctrlc = GLOBUS_TRUE;
break;

case arg_a:
Expand Down
2 changes: 1 addition & 1 deletion gram/gatekeeper/source/configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_PREREQ([2.60])

AC_INIT([globus_gatekeeper],[11.3],[https://github.com/gridcf/gct/issues])
AC_INIT([globus_gatekeeper],[11.4],[https://github.com/gridcf/gct/issues])
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST([MAJOR_VERSION], [${PACKAGE_VERSION%%.*}])
AC_SUBST([MINOR_VERSION], [${PACKAGE_VERSION##*.}])
Expand Down
12 changes: 8 additions & 4 deletions gram/gatekeeper/source/globus_gatekeeper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1494,6 +1494,7 @@ static void doit()
else if (mapping != NULL)
{
strncpy(&identity_buffer[0], mapping, sizeof(identity_buffer));
identity_buffer[sizeof(identity_buffer) - 1] = '\0';
}

userid = identity_buffer;
Expand Down Expand Up @@ -2210,16 +2211,19 @@ net_accept(int skt)

while (!gotit)
{
fd_set fdset;
fd_set fdset1;
fd_set fdset2;
struct timeval timeout;
int n;

FD_ZERO(&fdset);
FD_SET(skt, &fdset);
FD_ZERO(&fdset1);
FD_ZERO(&fdset2);
FD_SET(skt, &fdset1);
FD_SET(skt, &fdset2);
timeout.tv_sec = 60;
timeout.tv_usec = 0;

n = select(skt + 1, &fdset, (fd_set *) 0, &fdset, &timeout);
n = select(skt + 1, &fdset1, (fd_set *) 0, &fdset2, &timeout);

if (n < 0 && errno != EINTR)
{
Expand Down
Loading