There are a number of places where U-Boot intentionally and legally
accesses physical address 0x0000, for example when installing
exception vectors on systems where these are located in low memory.
Add "cppcheck-suppress nullPointer" comments to silence cppcheck
where this is intentional and legal.
Signed-off-by: Wolfgang Denk <wd@denx.de>
int i;
for (i = 0; i < 8; i++) {
int i;
for (i = 0; i < 8; i++) {
+ /* cppcheck-suppress nullPointer */
+ /* cppcheck-suppress nullPointer */
vt[i + 8] = start_addr + (4 * i);
}
}
vt[i + 8] = start_addr + (4 * i);
}
}
* fine.
*/
extern uint32_t _start;
* fine.
*/
extern uint32_t _start;
+
+ /* cppcheck-suppress nullPointer */
memcpy(0x0, &_start, 0x60);
}
memcpy(0x0, &_start, 0x60);
}
* first stage bootloader. To get ECC to work all memory has
* been initialized by writing any value.
*/
* first stage bootloader. To get ECC to work all memory has
* been initialized by writing any value.
*/
+ /* cppcheck-suppress nullPointer */
memset((void *)0, 0, 1 * 1024 * 1024);
} else {
puts("ECC disabled ");
memset((void *)0, 0, 1 * 1024 * 1024);
} else {
puts("ECC disabled ");
uint32_t *hibernate_magic = 0;
SSYNC();
uint32_t *hibernate_magic = 0;
SSYNC();
+ /* cppcheck-suppress nullPointer */
if (hibernate_magic[0] == 0xDEADBEEF) {
serial_putc('c');
bfin_write_EVT15(hibernate_magic[1]);
if (hibernate_magic[0] == 0xDEADBEEF) {
serial_putc('c');
bfin_write_EVT15(hibernate_magic[1]);
setup_ifc_sram = (void *)SRAM_BASE_ADDR;
dst = (u32 *) SRAM_BASE_ADDR;
src = (u32 *) setup_ifc;
setup_ifc_sram = (void *)SRAM_BASE_ADDR;
dst = (u32 *) SRAM_BASE_ADDR;
src = (u32 *) setup_ifc;
- for (i = 0; i < 1024; i++)
+ for (i = 0; i < 1024; i++) {
+ /* cppcheck-suppress nullPointer */
+ /* cppcheck-suppress nullPointer */
setup_ifc_sram();
/* CLEANUP */
setup_ifc_sram();
/* CLEANUP */
bootargs = getenv("bootargs");
/* Clear zero page */
bootargs = getenv("bootargs");
/* Clear zero page */
+ /* cppcheck-suppress nullPointer */
memset(param, 0, 0x1000);
/* Set commandline */
memset(param, 0, 0x1000);
/* Set commandline */
*/
int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
*/
int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int count = 0;
int count2 = 0;
int i;
int count = 0;
int count2 = 0;
int i;
* Mark sync address
*/
ptr = 0;
* Mark sync address
*/
ptr = 0;
+ /* cppcheck-suppress nullPointer */
*ptr = 0xffffffff;
puts("\nWaiting for image from pci host -");
/*
* Wait for host to write the start address
*/
*ptr = 0xffffffff;
puts("\nWaiting for image from pci host -");
/*
* Wait for host to write the start address
*/
+ /* cppcheck-suppress nullPointer */
while (*ptr == 0xffffffff) {
count++;
if (!(count % 100)) {
while (*ptr == 0xffffffff) {
count++;
if (!(count % 100)) {
testboot = (testpin != 0) && (s);
if (verbose) {
printf("testpin = %d\n", testpin);
testboot = (testpin != 0) && (s);
if (verbose) {
printf("testpin = %d\n", testpin);
+ /* cppcheck-suppress nullPointer */
printf("test_bank = %s\n", s ? s : "not set");
printf("boot test app : %s\n", (testboot) ? "yes" : "no");
}
printf("test_bank = %s\n", s ? s : "not set");
printf("boot test app : %s\n", (testboot) ? "yes" : "no");
}
FLASH_BUS *addr = (FLASH_BUS *) 0;
FLASH_BUS *addr = (FLASH_BUS *) 0;
+ /* cppcheck-suppress nullPointer */
*addr = FLASH_CMD (CFI_INTEL_CMD_READ_STATUS_REGISTER);
*addr = FLASH_CMD (CFI_INTEL_CMD_READ_STATUS_REGISTER);
+ /* cppcheck-suppress nullPointer */