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 printf format specifier in course1 inspect struct #169

Merged
merged 1 commit into from
Mar 2, 2024
Merged
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 curs/chap-01-prog/01-pointers/inspect_struct.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
ben.salary, ben.sex, ben.passport_number, ben.age);
printf("&ben.salary: %p, &ben.sex: %p, &ben.passport_number: %p, &ben.age: %p\n",
&ben.salary, &ben.sex, &ben.passport_number, &ben.age);
printf("offset(salary): %u, offset(sex): %u, offset(passport_number): %u, offset(age): %u\n",
printf("offset(salary): %tu, offset(sex): %tu, offset(passport_number): %tu, offset(age): %tu\n",

Check failure on line 25 in curs/chap-01-prog/01-pointers/inspect_struct.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: line length of 105 exceeds 100 columns
(char *) &ben.salary - (char *) &ben,
(char *) &ben.sex - (char *) &ben,
(char *) &ben.passport_number - (char *) &ben,
Expand Down
Loading