ARMmbed / ARMmbed/mbed-os-example-blinky

[Error] ws_pae_time.c@174,103: expected ')' before 'PRIi64'

Open
#274 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
CMake
Stars
42
Forks
154
PR merge metrics
No merged PRs in 30d

Description

I tried to compile the Blinky example by Mbed CLI, while it was prompted:
https://ibb.co/FhtfkFr

I have already used "sudo pip install -r requirements.txt":
https://ibb.co/NnJfF1T
https://ibb.co/1G8LPFW

After I ran "sudo pip install -U -r requirements.txt" in directory "mbed-os", it was prompted a python module "future" was missing, before I ran "sudo pip install -U -r requirements.txt", it was prompted 3 python modules "future, requests, click" were missing. Then I ran "pip install future" under "mbed-os", it was said "future" has been installed, but there was still error:ws_pae_time.c@174,103: expected ')' before 'PRIi64'.

I found the function where "Error" was prompted:

`int8_t ws_pae_current_time_set(uint64_t time)
{
uint64_t new_system_time;
current_time = time;

tr_debug("Current time set: %"PRIi64, time);

if (ns_time_system_time_read(&new_system_time) == 0) {
// System time has gone backwards
if (new_system_time < current_time || new_system_time > current_time + SYSTEM_TIME_MAXIMUM_DIFF) {
tr_error("FATAL: system time less than reference time or more than 12 months in future: %"PRIi64" reference time: %"PRIi64, new_system_time, current_time);
return -1;
}
}

return 0;

}
`

Should "expected ')' before 'PRIi64'" ?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Blinky example build with Mbed CLI and inspect ws_pae_time.c at line 174, especially the ws_pae_current_time_set function and its PRIi64 format strings. Check the compiler output and surrounding includes, then confirm the build completes without the reported parse error.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.