Skip to content

Commit

Permalink
Fix warnings comparing signed & unsigned integers
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeekman committed Jan 28, 2025
1 parent 21a7855 commit f5075a2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/selectfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -736,8 +736,7 @@ bool processInstrumentationRequests(const char *fname)
the string. "#foo" becomes #foo and is passed on to the
exclude list. */
char *exclude = strdup(&inbuf[1]);
int i;
for (i = 0; i < strlen(exclude); i++) {
for (size_t i = 0; i < strlen(exclude); i++) {
if (exclude[i] == '"') {
exclude[i]='\0';
break; /* out of the loop */
Expand Down Expand Up @@ -772,8 +771,7 @@ bool processInstrumentationRequests(const char *fname)
the string. "#foo" becomes #foo and is passed on to the
exclude list. */
char *exclude = strdup(&inbuf[1]);
int i;
for (i = 0; i < strlen(exclude); i++) {
for (size_t i = 0; i < strlen(exclude); i++) {
if (exclude[i] == '"') {
exclude[i]='\0';
break; /* out of the loop */
Expand Down Expand Up @@ -806,7 +804,7 @@ bool processInstrumentationRequests(const char *fname)
// strip quotes
if (inbuf[0] == '"') {
char *include = strdup(&inbuf[1]);
for (int i = 0; i < strlen(include); i++) {
for (size_t i = 0; i < strlen(include); i++) {
if (include[i] == '"') {
include[i] = '\0';
break;
Expand Down Expand Up @@ -839,7 +837,7 @@ bool processInstrumentationRequests(const char *fname)
// strip quotes
if (inbuf[0] == '"') {
char *exclude = strdup(&inbuf[1]);
for (int i = 0; i < strlen(exclude); i++) {
for (size_t i = 0; i < strlen(exclude); i++) {
if (exclude[i] == '"') {
exclude[i] = '\0';
break;
Expand Down

0 comments on commit f5075a2

Please sign in to comment.