Age | Commit message (Collapse) | Author | Files | Lines |
|
GCC 8 complains about the following usages of strncpy, too:
create_crc.c:86:3: warning: ‘strncpy’ specified bound 16 equals destination
size [-Wstringop-truncation]
strncpy(uHeader.stHeader.version, pcVersion, 16);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
create_crc.c:84:3: warning: ‘strncpy’ specified bound 16 equals destination
size [-Wstringop-truncation]
strncpy(uHeader.stHeader.version, pcVersion, 16);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Let's work around the issue by using memcpy instead.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
GCC 8.1 introduce some new warnings which affect create_crc.c. One of
them is:
create_crc.c: In function ‘createHeaderImage’:
create_crc.c:110:2: warning: ‘strncpy’ output truncated before terminating nul
copying 8 bytes from a string of the same length [-Wstringop-truncation]
strncpy(uHeader.stHeader.magic, FLASHFS_MAGIC, 8);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Initialize the header struct statically here instead to silence the warning.
Suggested-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
Accessing the struct with memset and memcpy can also be done without the
union wrapper. While we're at it, also remove the FLASHFS_HEADER_DATA_SIZE
macre and use sizeof(stHeader) instead.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
This moves the CRC code to its own files without dependencies on
board specific parts of SLOF. That why it can also be used from
other parts of the code.
(cherry picked from commit e0c2a1d61a66309fd6f0cec7efadd7e988bd03ab)
Cherry picked from https://lisas.de/~adrian/slof/slof.git/
Signed-off-by: Adrian Reber <adrian@lisas.de>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
Most of these errors were found by codespell:
controler -> controller
appropiate -> appropriate
devide -> divide
comming -> coming
seperate -> separate
reponsible -> responsible
initialization -> initialization
successfull -> successful
whithin -> within
recieve -> receive
wich -> which
occurence -> occurrence
beggining -> beginning
accessable -> accessible
proccess -> process
succesfuly -> successfully
immediatly -> immediately
prefered -> preferred
avaliable -> available
threshhold -> threshold
statistsics -> statistics
endianess -> endianness
positon -> position
writen -> written
occurence -> occurrence
upto -> up to
overwriten -> overwritten
availabe -> available
enviroment -> environment
intruction -> instruction
thru -> through
substract -> subtract
occured -> occurred
begining -> beginning
lenght -> length
atributes -> attributes
preceeding -> preceding
defintion -> definition
decriptor -> descriptor
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
This updates a number of .gitignore files to ignore generated targets of
various sorts.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
|
|
Replaced "make" by "$(MAKE)" to be able to built in parallel, fixed
the indentation of some rules and removed some unused targets.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
Added a new board for SLOF running on KVM/qemu.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|