1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-26 22:52:34 +02:00

tests: Add header stdlib.h to allow scan-build to do analysis

Without the header being explicitly included, scan-build run on CI
was returning errors for these files, such as:

include the header <stdlib.h> or explicitly provide a declaration
for 'calloc'

The functions in question were calloc, free, etc.

Change-Id: I4b79c5f86c074c456533296c309293e4064abe3f
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/84455
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Anastasia Klimchuk 2024-09-21 21:37:55 +10:00
parent c7680c0236
commit 84bfe0e04e
8 changed files with 12 additions and 1 deletions

View File

@ -13,6 +13,8 @@
* GNU General Public License for more details.
*/
#include <stdlib.h>
#include "lifecycle.h"
#if CONFIG_CH341A_SPI == 1

View File

@ -16,6 +16,7 @@
#include <include/test.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "chipdrivers.h"

View File

@ -13,6 +13,7 @@
#include <include/test.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "tests.h"

View File

@ -13,9 +13,10 @@
* GNU General Public License for more details.
*/
#include <stdlib.h>
#include <include/test.h>
#include "tests.h"
#include "programmer.h"
#define assert_equal_and_free(text, expected) \

View File

@ -19,6 +19,7 @@
#include "flash.h"
#include <stdint.h>
#include <stdlib.h>
void address_to_bits_test_success(void **state)
{

View File

@ -13,6 +13,8 @@
* GNU General Public License for more details.
*/
#include <stdlib.h>
#include "lifecycle.h"
#if CONFIG_LINUX_MTD == 1

View File

@ -13,6 +13,8 @@
* GNU General Public License for more details.
*/
#include <stdlib.h>
#include "lifecycle.h"
#if CONFIG_RAIDEN_DEBUG_SPI == 1

View File

@ -20,6 +20,7 @@
#include "io_real.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <pthread.h>