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

ACS: Fix incompatible pointer types #619

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jhunkeler
Copy link
Contributor

See #618

[..]/hstcal/pkg/acs/lib/getacskeys.c:80:61: error: passing argument 5 ofGetKeyBoolmakes pointer from integer without a cast [-Wint-conversion]
   80 |         if (GetKeyBool (phdr, "SUBARRAY", NO_DEFAULT, 0, &acs->subarray))
      |                                                          ~~~^~~~~~~~~~
      |                                                             |
      |                                                             int
[..]/hstcal/pkg/acs/lib/getacskeys.c: In functioncheckACSKeys’:
[..]/hstcal/pkg/acs/lib/getacskeys.c:148:15: error: passing argument 1 ofupperCasefrom incompatible pointer type [-Wincompatible-pointer-types]
  148 |     upperCase(&acs->aperture);
      |               ^~~~~~~~~~~~~~
      |               |
      |               char (*)[25]
In file included from [..]/hstcal/pkg/acs/lib/getacskeys.c:11:
[..]/hstcal/include/str_util.h:6:23: note: expectedchar *but argument is of typechar (*)[25]’
    6 | void upperCase(char * str);
      |                ~~~~~~~^~~
[..]/hstcal/pkg/acs/lib/getacskeys.c:149:15: error: passing argument 1 ofupperCasefrom incompatible pointer type [-Wincompatible-pointer-types]
  149 |     upperCase(&acs->jwrotype);
      |               ^~~~~~~~~~~~~~
      |               |
      |               char (*)[25]
[..]/hstcal/include/str_util.h:6:23: note: expectedchar *but argument is of typechar (*)[25]’
    6 | void upperCase(char * str);
      |                ~~~~~~~^~~
[..]/hstcal/pkg/acs/lib/getacskeys.c:150:15: error: passing argument 1 ofupperCasefrom incompatible pointer type [-Wincompatible-pointer-types]
  150 |     upperCase(&acs->flashstatus);
      |               ^~~~~~~~~~~~~~~~~
      |               |
      |               char (*)[25]
[..]/hstcal/include/str_util.h:6:23: note: expectedchar *but argument is of typechar (*)[25]’
    6 | void upperCase(char * str);
      |                ~~~~~~~^~~
[..]/hstcal/pkg/acs/lib/getacskeys.c:166:19: error: passing argument 1 ofupperCasefrom incompatible pointer type [-Wincompatible-pointer-types]
  166 |         upperCase(&acs->ccdamp);
      |                   ^~~~~~~~~~~~
      |                   |
      |                   char (*)[5]
[..]/hstcal/include/str_util.h:6:23: note: expectedchar *but argument is of typechar (*)[5]’
    6 | void upperCase(char * str);
      |                ~~~~~~~^~~

* ACSInfo struct member 'subarray' is an int, not Bool. Use GetKeyInt()
  in place of GetKeyBool()
* upperCase() function argument expects type (char *), not (char **)
@github-actions github-actions bot added the ACS label Jul 26, 2024
@jhunkeler jhunkeler marked this pull request as ready for review August 29, 2024 12:20
@jhunkeler jhunkeler requested a review from a team as a code owner August 29, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant