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 warnings #17

Open
wants to merge 5 commits into
base: aspeed-master-v2019.04
Choose a base branch
from

Conversation

shenki
Copy link

@shenki shenki commented Mar 6, 2023

No description provided.

sjg20 and others added 5 commits March 7, 2023 10:26
gcc 12 seems to warn on strncpy() as a matter of course. Rewrite the code
a different way to do the same thing, to avoid the warning.

Signed-off-by: Simon Glass <[email protected]>
Signed-off-by: Joel Stanley <[email protected]>
This is the upstream equivalent of these two fixes:

 57450d8 ("Makefile: Link with -z noexectack")
 1e1c51f ("Makefile: link with --no-warn-rwx-segments")

Signed-off-by: Joel Stanley <[email protected]>
This avoids the warning about mutliple STR defines:

 ../env/mmc.c:22: warning: "STR" redefined
   22 | #define STR(X) __STR(X)

Signed-off-by: Joel Stanley <[email protected]>
More C files do not use compile time timestamp macros and do not have to be
recompiled every time when SOURCE_DATE_EPOCH changes.

This patch moves version_string[] from version.h to version_string.h and
updates other C files which only needs version_string[] string to include
version_string.h instead of version.h. After applying this patch these
files are not recompiled every time when SOURCE_DATE_EPOCH changes.

Signed-off-by: Pali Rohár <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Signed-off-by: Joel Stanley <[email protected]>
Header file version.h does not use anything from timestamp.h. Including of
timestamp.h has side effect which cause recompiling object file at every
make run because timestamp.h changes at every run.

So remove timestamp.h from version.h and include timestamp.h in files
which needs it.

This change reduce recompilation time of final U-Boot binary when U-Boot
source files were not changed as less source files needs to be recompiled.

Signed-off-by: Pali Rohár <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
[trini: Add in lib/acpi/acpi_table.c and test/dm/acpi.c, rework a few others]
Signed-off-by: Tom Rini <[email protected]>
Signed-off-by: Joel Stanley <[email protected]>
@aspeedkevin
Copy link
Member

| /home/kevin/openbmc/build/workspace/sources/u-boot-aspeed-sdk/lib/smbios.c: In function 'smbios_write_type0':
| /home/kevin/openbmc/build/workspace/sources/u-boot-aspeed-sdk/lib/smbios.c:84:58: error: 'U_BOOT_DMI_DATE' undeclared (first use in this function)
| 84 | t->bios_release_date = smbios_add_string(t->eos, U_BOOT_DMI_DATE);

Hi, I think timestamp.h is needed in lib/smbios.c.
Please fix it. Thanks a lot.

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.

5 participants