static int image_get_next_item(HIMAGE hImage,unsigned int iItem, char* maintype, char* subtype)
{
FILE* fp = (FILE*)hImage;
- unsigned int nItem = 0;
+
if(ImageDecoder->AmlFirmwareImg->crc==0){
memset(ImageDecoder->AmlFirmwareImg,0,sizeof(AmlFirmwareImg_t));
fseeko(fp,0,SEEK_SET);
#define MTYPE_TAG "main_type="
#define STYPE_TAG "sub_type="
-static int image_cfg_parse(char *data,int length)
+static int image_cfg_parse(char *data,int length __attribute__((__unused__)))
{
int ret = 0;
static const ItemInfo* previous_duplicated_item_id(const FileList* headFileList, const FileList* const curFileList,
const ItemInfo* headItemInfo, const ItemInfo* curItemInfo)
{
- int itemId = -1;
- int i = 0;
-
for(;headFileList != curFileList && headFileList->next; headFileList = headFileList->next)
{
int rc = strcmp(curFileList->name, headFileList->name);
char sub_type[32] = {0};
char outfile[512] = {0};
char cfgfile[128] = {0};
- char buff[256] = {0};
#ifdef BUILD_DLL
if(ImageDecoder->AmlFirmwareImg == NULL){
int main(int argc, char * const* argv)
{
int ret = 0;
- int c = 0;
- const char* optstring = "d:r:c:";
-
if(argc < 3||argc > 5) {
printf("invalid arguments argc==%d\n", argc);
fprintf(stderr,usage,argv[0],argv[0],argv[0],argv[0]);
* bytes of input processed.
*/
void sha1_csum_wd (unsigned char *input, int ilen, unsigned char output[20],
- unsigned int chunk_sz)
+ unsigned int chunk_sz __attribute__((__unused__)))
{
sha1_context ctx;
#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
sparse_header_t *header = (sparse_header_t*) source;
if(length < sizeof(sparse_header_t)) {
- fprintf(stderr,"length %d < sparse_header_t len %d\n", length, FILE_HEAD_SIZE);
+ fprintf(stderr,"length %d < sparse_header_t len %lu\n", length, FILE_HEAD_SIZE);
return 0;
}
if (header->magic != SPARSE_HEADER_MAGIC) {
&& FILE_HEAD_SIZE == header->file_hdr_sz
&& CHUNK_HEAD_SIZE == header->chunk_hdr_sz))
{
- fprintf(stderr,"want 0x [%x, %x, %x], but [%x, %x, %x]\n",
+ fprintf(stderr,"want 0x [%x, %lx, %lx], but [%x, %x, %x]\n",
SPARSE_HEADER_MAJOR_VER, FILE_HEAD_SIZE, CHUNK_HEAD_SIZE,
header->major_version, header->file_hdr_sz, header->chunk_hdr_sz);
return 0;