Skip to content

Commit

Permalink
pflash: build with skiboot HOSTCFLAGS warnings
Browse files Browse the repository at this point in the history
mostly missing prototypes and unused parameters.

Reviewed-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
stewartsmith committed Jul 19, 2017
1 parent f2c87a3 commit 9880e14
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
12 changes: 9 additions & 3 deletions external/common/arch_flash_common.c
Expand Up @@ -40,17 +40,23 @@ int __attribute__((weak)) arch_flash_erase_chip(struct blocklevel_device *bl)
return blocklevel_erase(bl, 0, total_size);
}

int __attribute__((weak)) arch_flash_4b_mode(struct blocklevel_device *bl, int set_4b)
int __attribute__((weak,const)) arch_flash_4b_mode(struct blocklevel_device *bl, int set_4b)
{
(void)bl;
(void)set_4b;
return -1;
}

enum flash_access __attribute__((weak)) arch_flash_access(struct blocklevel_device *bl, enum flash_access access)
enum flash_access __attribute__((weak,const)) arch_flash_access(struct blocklevel_device *bl, enum flash_access access)
{
(void)bl;
(void)access;
return ACCESS_INVAL;
}

int __attribute__((weak)) arch_flash_set_wrprotect(struct blocklevel_device *bl, int set)
int __attribute__((weak,const)) arch_flash_set_wrprotect(struct blocklevel_device *bl, int set)
{
(void)bl;
(void)set;
return -1;
}
1 change: 1 addition & 0 deletions external/common/arch_flash_x86.c
Expand Up @@ -49,5 +49,6 @@ int arch_flash_init(struct blocklevel_device **r_bl, const char *file, bool keep

void arch_flash_close(struct blocklevel_device *bl, const char *file)
{
(void)file;
file_exit_close(bl);
}
2 changes: 1 addition & 1 deletion external/pflash/pflash.c
Expand Up @@ -595,7 +595,7 @@ static void print_help(const char *pname)
printf("\t\tThis message.\n\n");
}

void exiting(void)
static void exiting(void)
{
if (need_relock)
arch_flash_set_wrprotect(bl, 1);
Expand Down
1 change: 1 addition & 0 deletions external/pflash/progress.c
Expand Up @@ -3,6 +3,7 @@
#include <string.h>
#include <limits.h>
#include <time.h>
#include "progress.h"

static unsigned long progress_max;
static unsigned int progress_pcent;
Expand Down
1 change: 1 addition & 0 deletions libflash/file.c
Expand Up @@ -31,6 +31,7 @@
#include <mtd/mtd-abi.h>

#include "libflash.h"
#include "libflash/file.h"
#include "blocklevel.h"

struct file_data {
Expand Down

0 comments on commit 9880e14

Please sign in to comment.