Skip to content

fix 1.ranges-of-variables.c #10

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

Merged
merged 2 commits into from
Jan 20, 2025
Merged

fix 1.ranges-of-variables.c #10

merged 2 commits into from
Jan 20, 2025

Conversation

isidroas
Copy link
Contributor

  • fix range of unsigned types
  • printf format fix warnings

$ gcc --std=c89 1.ranges-of-variables.c
1.ranges-of-variables.c: In function ‘main’:
1.ranges-of-variables.c:13:28: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
   13 |         printf("LONG_MIN: %d\n", LONG_MIN);
      |                           ~^
      |                            |
      |                            int
      |                           %ld
1.ranges-of-variables.c:32:34: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
   32 |         printf("signed long min=%d\n",-(long)((unsigned long) ~0 >> 1));
      |                                 ~^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                  |    |
      |                                  int  long int
      |                                 %ld
@Heatwave Heatwave merged commit dfd9250 into Heatwave:master Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants