paflof: Use CFLAGS from make.rules instead of completely redefining them

It's cumbersome to change the CFLAGS in multiple places in case they
have to be changed. So let's use the global CFLAGS from make.rules
for building Paflof, too. Since the global rules use some additional
compiler warning flags, fix the now occuring compiler warnings in
the Paflof code, too (mostly about missing or wrong prototypes).

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
This commit is contained in:
Thomas Huth 2016-09-09 21:51:59 +02:00 committed by Alexey Kardashevskiy
parent b3fde41bc7
commit 4885692898
4 changed files with 12 additions and 12 deletions

View File

@ -27,9 +27,7 @@ INCLBRDDIR ?= $(TOPBRDDIR)/include
CPPFLAGS += -I. -I$(INCLCMNDIR) -I$(INCLBRDDIR) -I$(INCLCMNDIR)/$(CPUARCH)
CFLAGS = -DTARG=$(TARG) -static -Wall -W -std=gnu99 \
-O2 -fomit-frame-pointer -msoft-float $(FLAG) $(CPUARCHDEF) \
-fno-stack-protector -fno-strict-aliasing
CFLAGS += -DTARG=$(TARG) -static -std=gnu99 $(FLAG) $(CPUARCHDEF)
ASFLAGS = -Wa,-mpower4 -Wa,-mregnames $(FLAG) $(CPUARCHDEF)
LDFLAGS += -static -nostdlib -Wl,-q,-n

View File

@ -17,6 +17,7 @@
#include <stdlib.h>
#include <stdbool.h>
#include <helpers.h>
#include <allocator.h>
#undef DEBUG
//#define DEBUG
@ -45,17 +46,17 @@ struct bitmap {
#define BM_WORD_MODULO(n) (n % BM_WORD_BITS)
#define BM_NUM_BITS(reqsize, bsize) ((reqsize / bsize) + (reqsize % bsize? 1 : 0))
void bm_clear_bit(unsigned long *bmw, int n)
static void bm_clear_bit(unsigned long *bmw, int n)
{
BM_WORD(bmw, n) &= ~BIT(BM_WORD_MODULO(n));
}
void bm_set_bit(unsigned long *bmw, int n)
static void bm_set_bit(unsigned long *bmw, int n)
{
BM_WORD(bmw, n) |= BIT(BM_WORD_MODULO(n));
}
bool bm_test_bit(unsigned long *bmw, int n)
static bool bm_test_bit(unsigned long *bmw, int n)
{
#ifdef DEBUG
//printf("BMW %x, bitpos %d, value %d\n", &BM_WORD(bmw, n), n, !!(BM_WORD(bmw, n) & BIT(BM_WORD_MODULO(n))));
@ -64,7 +65,7 @@ bool bm_test_bit(unsigned long *bmw, int n)
}
/* Improvement: can use FFS routines to get faster results */
int bm_find_bits(struct bitmap *bm, unsigned int n_bits)
static int bm_find_bits(struct bitmap *bm, unsigned int n_bits)
{
unsigned int i, j, total_bits;
int found = -1;

View File

@ -10,8 +10,11 @@
* IBM Corporation - initial implementation
*****************************************************************************/
#include <unistd.h>
#include <cpu.h>
void asm_cout(long Character,long UART,long NVRAM);
/* the exception frame should be page aligned
* the_exception_frame is used by the handler to store a copy of all
* registers after an exception; this copy can then be used by paflof's
@ -45,8 +48,7 @@ extern void io_putchar(unsigned char);
extern unsigned long call_c(cell arg0, cell arg1, cell arg2, cell entry);
long
writeLogByte_wrapper(long x, long y)
static long writeLogByte_wrapper(long x, long y)
{
unsigned long result;
@ -66,8 +68,7 @@ writeLogByte_wrapper(long x, long y)
* @param count number of bytes to be written
* @return the number of bytes that have been written successfully
*/
int
write(int fd, const void *buf, int count)
ssize_t write(int fd, const void *buf, size_t count)
{
int i;
char *ptr = (char *)buf;

View File

@ -34,7 +34,7 @@ extern cell the_mem[]; /* Space for the dictionary / the HERE pointer */
extern cell *restrict dp;
extern cell *restrict rp;
void client_entry_point();
void client_entry_point(void);
extern unsigned long call_client(cell);
extern long c_romfs_lookup(long, long, void *);