diff --git a/examples/cli/main.c b/examples/cli/main.c index 3f57ad6f..bc9e7d06 100644 --- a/examples/cli/main.c +++ b/examples/cli/main.c @@ -137,7 +137,7 @@ my_prompt(int cont __cne_unused) char *p = cli_path_string(NULL, NULL); if (!p) - p = (char *)(uintptr_t) "PathError"; + p = (char *)(uintptr_t)"PathError"; cne_printf("[orange]cli[]:[magenta]%s[yellow]>[] ", p); diff --git a/lib/cnet/chnl/chnl_open.c b/lib/cnet/chnl/chnl_open.c index fe7507dd..281ab40e 100644 --- a/lib/cnet/chnl/chnl_open.c +++ b/lib/cnet/chnl/chnl_open.c @@ -156,7 +156,7 @@ chnl_open(const char *str, int flags, chnl_cb_t fn) domain = AF_UNSPEC; typ = 0; - ipaddr = (char *)(uintptr_t) "0.0.0.0"; + ipaddr = (char *)(uintptr_t)"0.0.0.0"; switch (pt->otype) { case UDP4_LISTEN: diff --git a/lib/cnet/cmds/cnet_cmds.c b/lib/cnet/cmds/cnet_cmds.c index d763660d..f47f2e3d 100644 --- a/lib/cnet/cmds/cnet_cmds.c +++ b/lib/cnet/cmds/cnet_cmds.c @@ -351,8 +351,7 @@ _node_style(char *name, int src) { 0, "tcp_*", "[fillcolor=lightpink]" }, { CNE_NODE_SOURCE_F, NULL, "[fillcolor=cyan]" }, { CNE_NODE_INPUT_F, NULL, "[fillcolor=lightskyblue]" }, - { 0, NULL, "[fillcolor=lightgrey]" } - // clang-format on + { 0, NULL, "[fillcolor=lightgrey]" } // clang-format on }; for (int i = 0; i < cne_countof(styles); i++) { diff --git a/lib/cnet/tcp/cnet_tcp_chnl.c b/lib/cnet/tcp/cnet_tcp_chnl.c index 44184e1f..e52156cd 100644 --- a/lib/cnet/tcp/cnet_tcp_chnl.c +++ b/lib/cnet/tcp/cnet_tcp_chnl.c @@ -465,7 +465,7 @@ tcp_chnl_opt_get(struct chnl *ch, int level, int optname, void *optval, uint32_t *resI = ch->ch_pcb->opt_flag & TCP_NOPUSH_FLAG; break; case TCP_CONGESTION: - resP = (void *)(uintptr_t) "reno"; + resP = (void *)(uintptr_t)"reno"; len = 5; break; case TCP_INFO: diff --git a/lib/usr/app/cli/cli_auto_complete.c b/lib/usr/app/cli/cli_auto_complete.c index c040a93e..70257f85 100644 --- a/lib/usr/app/cli/cli_auto_complete.c +++ b/lib/usr/app/cli/cli_auto_complete.c @@ -175,9 +175,9 @@ complete_args(int argc, char **argv, uint32_t types) gb_str_insert(gb, &node->name[slen], nlen); if (is_directory(node)) - gb_str_insert(gb, (char *)(uintptr_t) "/", 1); + gb_str_insert(gb, (char *)(uintptr_t)"/", 1); else - gb_str_insert(gb, (char *)(uintptr_t) " ", 1); + gb_str_insert(gb, (char *)(uintptr_t)" ", 1); } } cli_node_list_free(nodes); @@ -238,7 +238,7 @@ cli_auto_complete(void) gb_copy_to_buf(this_cli->gb, save, size); /* Add the -? to the command */ - gb_str_insert(this_cli->gb, (char *)(uintptr_t) "-?", 2); + gb_str_insert(this_cli->gb, (char *)(uintptr_t)"-?", 2); cli_execute(); diff --git a/lib/usr/app/cli/cli_history.c b/lib/usr/app/cli/cli_history.c index c14db342..d02e5572 100644 --- a/lib/usr/app/cli/cli_history.c +++ b/lib/usr/app/cli/cli_history.c @@ -147,7 +147,7 @@ cli_history_next(void) return NULL; if (cli->curr_hist == CIRCLEQ_LAST(&cli->hd_hist)) - return (char *)(uintptr_t) ""; + return (char *)(uintptr_t)""; hist = CIRCLEQ_LOOP_NEXT(&cli->hd_hist, cli->curr_hist, next); cli->curr_hist = hist; diff --git a/lib/usr/clib/acl/cne_acl.h b/lib/usr/clib/acl/cne_acl.h index f799023a..799a11ca 100644 --- a/lib/usr/clib/acl/cne_acl.h +++ b/lib/usr/clib/acl/cne_acl.h @@ -96,7 +96,7 @@ enum { }; #define CNE_ACL_MASKLEN_TO_BITMASK(v, s) \ - ((v) == 0 ? (v) : (typeof(v))((uint64_t) - 1 << ((s) * CHAR_BIT - (v)))) + ((v) == 0 ? (v) : (typeof(v))((uint64_t)-1 << ((s) * CHAR_BIT - (v)))) /** * Miscellaneous data for ACL rule. diff --git a/lib/usr/clib/cthread/cthread_tls.h b/lib/usr/clib/cthread/cthread_tls.h index 8f39e865..7105b7c5 100644 --- a/lib/usr/clib/cthread/cthread_tls.h +++ b/lib/usr/clib/cthread/cthread_tls.h @@ -12,7 +12,7 @@ extern "C" { #endif #ifndef __APPLE__ -#define CNE_PER_CTHREAD_SECTION_SIZE ((uintptr_t) & __stop_per_dt - (uintptr_t) & __start_per_dt) +#define CNE_PER_CTHREAD_SECTION_SIZE ((uintptr_t)&__stop_per_dt - (uintptr_t)&__start_per_dt) #else #define CNE_PER_CTHREAD_SECTION_SIZE 0 #endif diff --git a/test/testcne/loop_test.c b/test/testcne/loop_test.c index ec8b19fb..49083b42 100644 --- a/test/testcne/loop_test.c +++ b/test/testcne/loop_test.c @@ -161,7 +161,7 @@ loop_main(int argc, char **argv) lport = 0; optind = 0; - ifname = (char *)(uintptr_t) "Unknown"; + ifname = (char *)(uintptr_t)"Unknown"; while ((opt = getopt_long(argc, argvopt, "Vi:d:DLT2", lgopts, &option_index)) != EOF) { switch (opt) { case 'V':