Changeset 4977f07e in rtems


Ignore:
Timestamp:
Oct 9, 2014, 5:56:18 PM (6 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
20cb691
Parents:
ab31e8e1
git-author:
Joel Sherrill <joel.sherrill@…> (10/09/14 17:56:18)
git-committer:
Joel Sherrill <joel.sherrill@…> (10/10/14 15:17:17)
Message:

i386/pc386: Eliminate multiple warnings

Location:
c/src/lib/libbsp/i386
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/pc386/console/conscfg.c

    rab31e8e1 r4977f07e  
    66
    77/*
    8  *  COPYRIGHT (c) 1989-2011.
     8 *  COPYRIGHT (c) 1989-2014.
    99 *  On-Line Applications Research Corporation (OAR).
    1010 *
     
    2222#include <bsp/irq.h>
    2323#include <rtems/pci.h>
     24#include <bsp/rtd316.h>
    2425
    2526#define VGA_CONSOLE_FUNCTIONS  &vgacons_fns
     
    4041#define CLOCK_RATE     (115200 * 16)
    4142
    42 uint8_t com_get_register(uint32_t addr, uint8_t i)
     43static uint8_t com_get_register(uint32_t addr, uint8_t i)
    4344{
    4445  register uint8_t val;
     
    4849}
    4950
    50 void com_set_register(uint32_t addr, uint8_t i, uint8_t val)
     51static void com_set_register(uint32_t addr, uint8_t i, uint8_t val)
    5152{
    5253  outport_byte( (addr + i),val );
  • c/src/lib/libbsp/i386/pc386/console/keyboard.c

    rab31e8e1 r4977f07e  
    2929#endif
    3030
    31 int set_bit(int nr, unsigned long * addr)
     31static int set_bit(int nr, unsigned long * addr)
    3232{
    3333  int                   mask;
     
    4444}
    4545
    46 int clear_bit(int nr, unsigned long * addr)
     46static int clear_bit(int nr, unsigned long * addr)
    4747{
    4848  int                   mask;
     
    5959}
    6060
    61 int test_bit(int nr, unsigned long * addr)
     61static int test_bit(int nr, unsigned long * addr)
    6262{
    6363  int  mask;
     
    168168 * in utf-8 already.
    169169 */
    170 void to_utf8(ushort c) {
    171     if (c < 0x80)
    172   put_queue(c);      /*  0*******  */
    173     else if (c < 0x800) {
    174   put_queue(0xc0 | (c >> 6));   /*  110***** 10******  */
    175   put_queue(0x80 | (c & 0x3f));
    176     } else {
    177   put_queue(0xe0 | (c >> 12));   /*  1110**** 10****** 10******  */
    178   put_queue(0x80 | ((c >> 6) & 0x3f));
    179   put_queue(0x80 | (c & 0x3f));
    180     }
    181     /* UTF-8 is defined for words of up to 31 bits,
    182        but we need only 16 bits here */
     170static void to_utf8(ushort c)
     171{
     172  if (c < 0x80)
     173    put_queue(c);                  /*  0*******  */
     174  else if (c < 0x800) {
     175    put_queue(0xc0 | (c >> 6));    /*  110***** 10******  */
     176    put_queue(0x80 | (c & 0x3f));
     177  } else {
     178    put_queue(0xe0 | (c >> 12));   /*  1110**** 10****** 10******  */
     179    put_queue(0x80 | ((c >> 6) & 0x3f));
     180    put_queue(0x80 | (c & 0x3f));
     181  }
     182  /* UTF-8 is defined for words of up to 31 bits,
     183     but we need only 16 bits here */
    183184}
    184185
     
    334335/*
    335336 */
    336 void kbd_set_driver_handler( void ( *handler )( void *, unsigned short, unsigned long ) )
     337void kbd_set_driver_handler(
     338  void ( *handler )( void *, unsigned short, unsigned long )
     339)
    337340{
    338341  driver_input_handler_kbd = handler;
     
    341344static void put_queue(int ch)
    342345{
    343   if( driver_input_handler_kbd )
    344   {
    345      driver_input_handler_kbd(  ( void *)kbd, (unsigned short)ch,  0 );
    346   }
    347   else
    348   {
    349      add_to_queue( ch );
     346  if ( driver_input_handler_kbd ) {
     347    driver_input_handler_kbd(  ( void *)kbd, (unsigned short)ch,  0 );
     348  } else {
     349    add_to_queue( ch );
    350350  }
    351351}
     
    378378  if (vc_kbd_mode(kbd,VC_CRLF))
    379379    put_queue(10);
    380 
    381380}
    382381
     
    404403    return;
    405404   chg_vc_kbd_led(kbd, VC_SCROLLOCK );
    406 
    407405}
    408406
    409407static void num(void)
    410408{
    411 
    412409  if (vc_kbd_mode(kbd,VC_APPLIC))
    413410    applkey('P', 1);
     
    772769
    773770unsigned char getledstate(void) {
    774     return ledstate;
     771  return ledstate;
    775772}
    776773
    777774void setledstate(struct kbd_struct *kbd, unsigned int led) {
    778     if (!(led & ~7)) {
    779   ledioctl = led;
    780    kbd->ledmode = LED_SHOW_IOCTL;
    781     } else
     775  if (!(led & ~7)) {
     776    ledioctl = led;
     777     kbd->ledmode = LED_SHOW_IOCTL;
     778  } else
    782779    ;
    783    kbd->ledmode = LED_SHOW_FLAGS;
    784     set_leds();
     780  kbd->ledmode = LED_SHOW_FLAGS;
     781  set_leds();
    785782}
    786783
    787784static struct ledptr {
    788     unsigned int *addr;
    789     unsigned int mask;
    790     unsigned char valid:1;
     785  unsigned int *addr;
     786  unsigned int mask;
     787  unsigned char valid:1;
    791788} ledptrs[3];
    792789
    793 void register_leds(int console, unsigned int led,
    794        unsigned int *addr, unsigned int mask) {
    795     struct kbd_struct *kbd = kbd_table + console;
    796 
    797    if (led < 3) {
    798   ledptrs[led].addr = addr;
    799   ledptrs[led].mask = mask;
    800   ledptrs[led].valid = 1;
    801   kbd->ledmode = LED_SHOW_MEM;
    802     } else
    803   kbd->ledmode = LED_SHOW_FLAGS;
    804 }
    805 
    806 static inline unsigned char getleds(void){
     790void register_leds(
     791  int console,
     792  unsigned int led,
     793  unsigned int *addr,
     794  unsigned int mask
     795)
     796{
     797  struct kbd_struct *kbd = kbd_table + console;
     798
     799  if (led < 3) {
     800    ledptrs[led].addr = addr;
     801    ledptrs[led].mask = mask;
     802    ledptrs[led].valid = 1;
     803    kbd->ledmode = LED_SHOW_MEM;
     804  } else
     805    kbd->ledmode = LED_SHOW_FLAGS;
     806}
     807
     808static inline unsigned char getleds(void)
     809{
    807810
    808811    struct kbd_struct *kbd = kbd_table + fg_console;
  • c/src/lib/libbsp/i386/pc386/console/outch.c

    rab31e8e1 r4977f07e  
    240240}
    241241
    242 void
     242static void
    243243clear_screen(void)
    244244{
     
    309309
    310310/* for old DOS compatibility n-curses type of applications */
     311void gotoxy( int x, int y );
     312int whereX( void );
     313int whereY( void );
     314
    311315void gotoxy( int x, int y )
    312316{
  • c/src/lib/libbsp/i386/pc386/console/rtd316.c

    rab31e8e1 r4977f07e  
    88
    99/*
    10  *  COPYRIGHT (c) 1989-2012.
     10 *  COPYRIGHT (c) 1989-2014.
    1111 *  On-Line Applications Research Corporation (OAR).
    1212 *
     
    2727#include <bsp/rtd316.h>
    2828#include <rtems/score/i386.h>
     29#include <rtems/console_private.h>
    2930
    3031#define RTD_CLOCK_RATE  (460800 * 32)
  • c/src/lib/libbsp/i386/pc386/console/rtd316.h

    rab31e8e1 r4977f07e  
    88
    99/*
    10  *  COPYRIGHT (c) 1989-2012.
     10 *  COPYRIGHT (c) 1989-2014.
    1111 *  On-Line Applications Research Corporation (OAR).
    1212 *
     
    4848);
    4949
     50/**
     51 *  @brief RTD316 Obtain Register Helper
     52 *
     53 *  This method is used to read registers on the RTD316.
     54 *
     55 *  @param[in] addr is the base address
     56 *  @param[in] reg is the register number
     57 *
     58 *  @return This method returns the value of the register.
     59 */
     60uint8_t rtd316_com_get_register(uint32_t addr, uint8_t reg);
     61
     62/**
     63 *  @brief RTD316 Set Register Helper
     64 *
     65 *  This method is used to set registers on the RTD316.
     66 *
     67 *  @param[in] addr is the base address
     68 *  @param[in] reg is the register number
     69 */
     70void rtd316_com_set_register(uint32_t addr,uint8_t reg, uint8_t val);
     71
    5072#ifdef __cplusplus
    5173}
  • c/src/lib/libbsp/i386/pc386/ide/ide.c

    rab31e8e1 r4977f07e  
    231231    bool        data_ready;
    232232
     233    (void) cur_multiple_sectors; /* avoid set but not used warning */
     234
    233235    memset(model_number, 0, sizeof(model_number));
    234236
  • c/src/lib/libbsp/i386/pc386/include/bsp.h

    rab31e8e1 r4977f07e  
    180180
    181181void Wait_X_ms(unsigned int timeToWait); /* from 'timer.c'  */
     182void Calibrate_loop_1ms(void);           /* from 'timer.c'  */
     183
     184void rtems_irq_mngt_init(void);          /* from 'irq_init.c' */
     185
     186void bsp_size_memory(void);              /* from 'bspstart.c' */
    182187
    183188void Clock_driver_install_handler(void); /* from 'ckinit.c'  */
    184189void Clock_driver_support_initialize_hardware(void); /* from 'ckinit.c'  */
     190
    185191size_t read_aux(char * buffer, size_t count); /* from 'ps2_mouse.c'  */
    186192
  • c/src/lib/libbsp/i386/pc386/startup/bspstart.c

    rab31e8e1 r4977f07e  
    3737 *  External routines
    3838 */
    39 extern void Calibrate_loop_1ms(void);
    40 extern void rtems_irq_mngt_init(void);
    41 extern void bsp_size_memory(void);
    4239void Clock_driver_install_handler(void);
    4340
  • c/src/lib/libbsp/i386/pc386/timer/timer.c

    rab31e8e1 r4977f07e  
    6666
    6767/*
    68  *  Timer cleanup routine at RTEMS exit. NOTE: This routine is
    69  *  not really necessary, since there will be a reset at exit.
    70  */
    71 
    72 void tsc_timer_exit(void)
    73 {
    74 }
    75 
    76 void tsc_timer_initialize(void)
     68 *  Timer cleanup routine at RTEMS exit.
     69 *
     70 *  NOTE: This routine is not really necessary, since there will be
     71 *        a reset at exit.
     72 */
     73static void tsc_timer_exit(void)
     74{
     75}
     76
     77static void tsc_timer_initialize(void)
    7778{
    7879  static bool First = true;
     
    8788
    8889/*
    89  *
    90  */
    91 uint32_t tsc_read_timer(void)
     90 * Read TSC timer value.
     91 */
     92static uint32_t tsc_read_timer(void)
    9293{
    9394  register uint32_t  total;
     
    152153
    153154/*
    154  * Timer cleanup routine at RTEMS exit. NOTE: This routine is
    155  *  not really necessary, since there will be a reset at exit.
    156  */ void
    157 i386_timer_exit(void)
     155 * Timer cleanup routine at RTEMS exit.
     156 *
     157 * NOTE: This routine is not really necessary, since there will be
     158 *       a reset at exit.
     159 */
     160static void i386_timer_exit(void)
    158161{
    159162  i386_delete_idt_entry (&timer_raw_irq_data);
     
    161164
    162165extern void rtems_irq_prologue_0(void);
    163 void i386_timer_initialize(void)
     166static void i386_timer_initialize(void)
    164167{
    165168  static bool First = true;
     
    193196 * Read hardware timer value.
    194197 */
    195 uint32_t i386_read_timer(void)
     198static uint32_t i386_read_timer(void)
    196199{
    197200  register uint32_t         total, clicks;
     
    269272 *  Returns: Nothing. Loaded value must be a number of clock bits...
    270273 */
    271 void loadTimerValue( unsigned short loadedValue )
     274static void loadTimerValue( unsigned short loadedValue )
    272275{
    273276  lastLoadedValue = loadedValue;
     
    283286 * Returns: number of clock bits elapsed since last load.
    284287 */
    285 unsigned int readTimer0(void)
     288static unsigned int readTimer0(void)
    286289{
    287290  unsigned short lsb, msb;
     
    303306}
    304307
    305 void Timer0Reset(void)
     308static void Timer0Reset(void)
    306309{
    307310  loadTimerValue(0xffff);
     
    309312}
    310313
    311 void fastLoop (unsigned int loopCount)
     314static void fastLoop (unsigned int loopCount)
    312315{
    313316  unsigned int i;
     
    315318}
    316319
    317 void slowLoop (unsigned int loopCount)
     320static void slowLoop (unsigned int loopCount)
    318321{
    319322  unsigned int j;
  • c/src/lib/libbsp/i386/shared/comm/i386-stub.c

    rab31e8e1 r4977f07e  
    608608/* If MAY_FAULT is non-zero, then we should set mem_err in response to
    609609   a fault; if zero treat a fault like any other fault in the stub.  */
    610 char *
     610static char *
    611611mem2hex (char *mem, char *buf, int count, int may_fault)
    612612{
     
    655655/* this function takes the 386 exception vector and attempts to
    656656   translate this number into a unix compatible signal value */
    657 int
     657static int
    658658computeSignal (int exceptionVector)
    659659{
     
    716716/* RETURN NUMBER OF CHARS PROCESSED           */
    717717/**********************************************/
    718 int
     718static int
    719719hexToInt (char **ptr, int *intValue)
    720720{
     
    743743/*
    744744 * This function does all command procesing for interfacing to gdb.
     745 *
     746 * NOTE: This method is called from assembly code so must be marked
     747 *       as used.
    745748 */
    746 void
     749static void handle_exception (int exceptionVector) __attribute__((used));
     750static void
    747751handle_exception (int exceptionVector)
    748752{
Note: See TracChangeset for help on using the changeset viewer.