Changeset 36e9cd1 in mainline


Ignore:
Timestamp:
2010-02-10T23:15:27Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0701066
Parents:
3149fc0
Message:

silence compiler warnings (no change in actual functionality)

Files:
28 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/macros.h

    r3149fc0 r36e9cd1  
    8484#define STRING_ARG(arg)  #arg
    8585
    86 #define LOWER32(arg)  ((arg) & 0xffffffff)
    87 #define UPPER32(arg)  (((arg) >> 32) & 0xffffffff)
     86#define LOWER32(arg)  (((uint64_t) (arg)) & 0xffffffff)
     87#define UPPER32(arg)  (((((uint64_t) arg)) >> 32) & 0xffffffff)
    8888
    8989#define MERGE_LOUP32(lo, up) \
  • uspace/app/bdsh/cmds/builtins/builtins.h

    r3149fc0 r36e9cd1  
    1010#include "cd/cd_def.h"
    1111#include "exit/exit_def.h"
    12         {NULL, NULL, NULL, NULL}
     12        {NULL, NULL, NULL, NULL, NULL}
    1313};
    1414
  • uspace/app/bdsh/cmds/builtins/cd/cd_def.h

    r3149fc0 r36e9cd1  
    44        &cmd_cd,
    55        &help_cmd_cd,
     6        0
    67},
  • uspace/app/bdsh/cmds/builtins/exit/exit_def.h

    r3149fc0 r36e9cd1  
    44        &cmd_exit,
    55        &help_cmd_exit,
     6        0
    67},
  • uspace/app/bdsh/input.c

    r3149fc0 r36e9cd1  
    508508{
    509509        int sa, sb;
    510         wchar_t tmp_c;
    511510        char *str;
    512511
     
    514513
    515514        if (sb < ti->nc) {
    516                 tmp_c = ti->buffer[sb];
     515                wchar_t tmp_c = ti->buffer[sb];
    517516                ti->buffer[sb] = '\0';
    518         }
    519 
    520         str = wstr_to_astr(ti->buffer + sa);
    521 
    522         if (sb < ti->nc)
     517                str = wstr_to_astr(ti->buffer + sa);
    523518                ti->buffer[sb] = tmp_c;
    524 
     519        } else
     520                str = wstr_to_astr(ti->buffer + sa);
     521       
    525522        if (str == NULL)
    526523                goto error;
  • uspace/app/edit/edit.c

    r3149fc0 r36e9cd1  
    718718        wchar_t c;
    719719        size_t pos, size;
    720         unsigned s_column;
     720        int s_column;
    721721        coord_t csel_start, csel_end, ctmp;
    722722
     
    766766                s_column = pane.sh_column;
    767767                while (pos < size) {
    768                         if (csel_start.row == rbc.row && csel_start.column == s_column) {
     768                        if ((csel_start.row == rbc.row) && (csel_start.column == s_column)) {
    769769                                fflush(stdout);
    770770                                console_set_color(con, COLOR_BLACK, COLOR_RED, 0);
     
    772772                        }
    773773       
    774                         if (csel_end.row == rbc.row && csel_end.column == s_column) {
     774                        if ((csel_end.row == rbc.row) && (csel_end.column == s_column)) {
    775775                                fflush(stdout);
    776776                                console_set_color(con, COLOR_BLACK, COLOR_WHITE, 0);
     
    792792                }
    793793
    794                 if (csel_end.row == rbc.row && csel_end.column == s_column) {
     794                if ((csel_end.row == rbc.row) && (csel_end.column == s_column)) {
    795795                        fflush(stdout);
    796796                        console_set_color(con, COLOR_BLACK, COLOR_WHITE, 0);
  • uspace/app/mkfat/fat.h

    r3149fc0 r36e9cd1  
    7878                        uint16_t        signature;
    7979                } __attribute__ ((packed));
    80                 struct fat32 {
     80                struct {
    8181                        /* FAT32 only */
    8282                        /** Sectors per FAT. */
     
    108108                        /** Signature. */
    109109                        uint16_t        signature;
    110                 } __attribute__ ((packed));
     110                } fat32 __attribute__ ((packed));
    111111        };
    112112} __attribute__ ((packed)) fat_bs_t;
  • uspace/app/redir/redir.c

    r3149fc0 r36e9cd1  
    7272static task_id_t spawn(int argc, char *argv[])
    7373{
    74         char **args = (char *) calloc(argc + 1, sizeof(char *));
     74        char **args = (char **) calloc(argc + 1, sizeof(char *));
    7575        if (!args) {
    7676                printf("No memory available\n");
  • uspace/app/taskdump/taskdump.c

    r3149fc0 r36e9cd1  
    356356}
    357357
    358 static int area_dump(as_area_info_t *area)
     358static __attribute__((unused)) int area_dump(as_area_info_t *area)
    359359{
    360360        size_t to_copy;
  • uspace/app/tester/fault/fault2.c

    r3149fc0 r36e9cd1  
    3030#include "../tester.h"
    3131
     32typedef int __attribute__((may_alias)) aliasing_int;
     33
    3234char *test_fault2(void)
    3335{
     
    3537        volatile int var1;
    3638       
    37         var1 = *((int *) (((char *) (&var)) + 1));
     39        var1 = *((aliasing_int *) (((char *) (&var)) + 1));
    3840       
    3941        return "Survived unaligned read";
  • uspace/lib/libc/arch/ia64/include/ddi.h

    r3149fc0 r36e9cd1  
    3939#include <libarch/types.h>
    4040
    41 #define IO_SPACE_BOUNDARY       (64 * 1024)
     41#define IO_SPACE_BOUNDARY       ((void *) (64 * 1024))
    4242
    4343uint64_t get_ia64_iospace_address(void);
  • uspace/lib/libc/arch/sparc64/include/ddi.h

    r3149fc0 r36e9cd1  
    3737#include <libarch/types.h>
    3838
    39 static inline memory_barrier(void)
     39static inline void memory_barrier(void)
    4040{
    41         asm volatile ("membar #LoadLoad | #StoreStore\n" ::: "memory");
     41        asm volatile (
     42                "membar #LoadLoad | #StoreStore\n"
     43                ::: "memory"
     44        );
    4245}
    4346
  • uspace/lib/libc/arch/sparc64/include/fibril.h

    r3149fc0 r36e9cd1  
    4848                    STACK_ALIGNMENT) - (STACK_BIAS + SP_DELTA); \
    4949                (c)->fp = -STACK_BIAS; \
    50                 (c)->tp = ptls; \
     50                (c)->tp = (uint64_t) ptls; \
    5151        } while (0)
    5252       
  • uspace/lib/libc/generic/clipboard.c

    r3149fc0 r36e9cd1  
    148148                        aid_t req = async_send_1(clip_phone, CLIPBOARD_GET_DATA, tag, NULL);
    149149                        rc = async_data_read_start(clip_phone, (void *) sbuf, size);
    150                         if (rc == EOVERFLOW) {
     150                        if ((int) rc == EOVERFLOW) {
    151151                                /*
    152152                                 * The data in the clipboard has changed since
  • uspace/lib/libc/generic/fibril.c

    r3149fc0 r36e9cd1  
    4141#include <unistd.h>
    4242#include <stdio.h>
     43#include <arch/barrier.h>
    4344#include <libarch/faddr.h>
    4445#include <futex.h>
     
    133134int fibril_switch(fibril_switch_type_t stype)
    134135{
    135         fibril_t *srcf, *dstf;
    136136        int retval = 0;
    137137       
    138138        futex_down(&fibril_futex);
    139 
     139       
    140140        if (stype == FIBRIL_PREEMPT && list_empty(&ready_list))
    141141                goto ret_0;
    142 
     142       
    143143        if (stype == FIBRIL_FROM_MANAGER) {
    144                 if (list_empty(&ready_list) && list_empty(&serialized_list))
     144                if ((list_empty(&ready_list)) && (list_empty(&serialized_list)))
    145145                        goto ret_0;
     146               
    146147                /*
    147148                 * Do not preempt if there is not enough threads to run the
    148149                 * ready fibrils which are not serialized.
    149150                 */
    150                 if (list_empty(&serialized_list) &&
    151                     threads_in_manager <= serialized_threads) {
     151                if ((list_empty(&serialized_list)) &&
     152                    (threads_in_manager <= serialized_threads)) {
    152153                        goto ret_0;
    153154                }
    154155        }
     156       
    155157        /* If we are going to manager and none exists, create it */
    156         if (stype == FIBRIL_TO_MANAGER || stype == FIBRIL_FROM_DEAD) {
     158        if ((stype == FIBRIL_TO_MANAGER) || (stype == FIBRIL_FROM_DEAD)) {
    157159                while (list_empty(&manager_list)) {
    158160                        futex_up(&fibril_futex);
     
    162164        }
    163165       
    164         srcf = __tcb_get()->fibril_data;
     166        fibril_t *srcf = __tcb_get()->fibril_data;
    165167        if (stype != FIBRIL_FROM_DEAD) {
     168               
    166169                /* Save current state */
    167170                if (!context_save(&srcf->ctx)) {
    168171                        if (serialization_count)
    169172                                srcf->flags &= ~FIBRIL_SERIALIZED;
     173                       
    170174                        if (srcf->clean_after_me) {
    171175                                /*
     
    173177                                 * restored context here.
    174178                                 */
    175                                 void *stack = srcf->clean_after_me->stack; 
     179                                void *stack = srcf->clean_after_me->stack;
    176180                                if (stack) {
    177181                                        /*
     
    188192                                srcf->clean_after_me = NULL;
    189193                        }
     194                       
    190195                        return 1;       /* futex_up already done here */
    191196                }
    192 
     197               
    193198                /* Save myself to the correct run list */
    194199                if (stype == FIBRIL_PREEMPT)
     
    197202                        list_append(&srcf->link, &manager_list);
    198203                        threads_in_manager--;
    199                 } else {       
     204                } else {
    200205                        /*
    201206                         * If stype == FIBRIL_TO_MANAGER, don't put ourselves to
     
    206211        }
    207212       
     213        /* Avoid srcf being clobbered by context_save() */
     214        srcf = __tcb_get()->fibril_data;
     215       
    208216        /* Choose a new fibril to run */
    209         if (stype == FIBRIL_TO_MANAGER || stype == FIBRIL_FROM_DEAD) {
     217        fibril_t *dstf;
     218        if ((stype == FIBRIL_TO_MANAGER) || (stype == FIBRIL_FROM_DEAD)) {
    210219                dstf = list_get_instance(manager_list.next, fibril_t, link);
    211220                if (serialization_count && stype == FIBRIL_TO_MANAGER) {
     
    214223                }
    215224                threads_in_manager++;
    216 
     225               
    217226                if (stype == FIBRIL_FROM_DEAD)
    218227                        dstf->clean_after_me = srcf;
     
    228237        }
    229238        list_remove(&dstf->link);
    230 
     239       
    231240        futex_up(&fibril_futex);
    232241        context_restore(&dstf->ctx);
    233242        /* not reached */
    234 
     243       
    235244ret_0:
    236245        futex_up(&fibril_futex);
  • uspace/lib/libc/generic/ipc.c

    r3149fc0 r36e9cd1  
    728728    int *flags)
    729729{
    730         int res;
    731         sysarg_t tmp_flags;
    732         res = ipc_call_sync_3_2(phoneid, IPC_M_SHARE_IN, (ipcarg_t) dst,
     730        sysarg_t tmp_flags = 0;
     731        int res = ipc_call_sync_3_2(phoneid, IPC_M_SHARE_IN, (ipcarg_t) dst,
    733732            (ipcarg_t) size, arg, NULL, &tmp_flags);
     733       
    734734        if (flags)
    735735                *flags = tmp_flags;
     736       
    736737        return res;
    737738}
  • uspace/lib/libc/include/macros.h

    r3149fc0 r36e9cd1  
    4848#define STRING_ARG(arg)  #arg
    4949
    50 #define LOWER32(arg)  ((arg) & 0xffffffff)
    51 #define UPPER32(arg)  (((arg) >> 32) & 0xffffffff)
     50#define LOWER32(arg)  (((uint64_t) (arg)) & 0xffffffff)
     51#define UPPER32(arg)  (((((uint64_t) arg)) >> 32) & 0xffffffff)
    5252
    5353#define MERGE_LOUP32(lo, up) \
  • uspace/srv/bd/ata_bd/ata_bd.c

    r3149fc0 r36e9cd1  
    500500
    501501        d = &disk[disk_id];
    502         bc.h = 0;       /* Silence warning. */
     502       
     503        /* Silence warning. */
     504        memset(&bc, 0, sizeof(bc));
    503505
    504506        /* Compute block coordinates. */
     
    574576
    575577        d = &disk[disk_id];
    576         bc.h = 0;       /* Silence warning. */
     578       
     579        /* Silence warning. */
     580        memset(&bc, 0, sizeof(bc));
    577581
    578582        /* Compute block coordinates. */
  • uspace/srv/hid/console/gcons.c

    r3149fc0 r36e9cd1  
    448448       
    449449        int pm = make_pixmap(_binary_gfx_anim_1_ppm_start,
    450             (int) &_binary_gfx_anim_1_ppm_size);
     450            (size_t) &_binary_gfx_anim_1_ppm_size);
    451451        async_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm);
    452452       
    453453        pm = make_pixmap(_binary_gfx_anim_2_ppm_start,
    454             (int) &_binary_gfx_anim_2_ppm_size);
     454            (size_t) &_binary_gfx_anim_2_ppm_size);
    455455        async_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm);
    456456       
    457457        pm = make_pixmap(_binary_gfx_anim_3_ppm_start,
    458             (int) &_binary_gfx_anim_3_ppm_size);
     458            (size_t) &_binary_gfx_anim_3_ppm_size);
    459459        async_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm);
    460460       
    461461        pm = make_pixmap(_binary_gfx_anim_4_ppm_start,
    462             (int) &_binary_gfx_anim_4_ppm_size);
     462            (size_t) &_binary_gfx_anim_4_ppm_size);
    463463        async_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm);
    464464       
  • uspace/srv/hid/fb/serial_console.c

    r3149fc0 r36e9cd1  
    5757void serial_putchar(wchar_t ch);
    5858
    59 static int scr_width;
    60 static int scr_height;
     59static unsigned int scr_width;
     60static unsigned int scr_height;
    6161static bool color = true;       /** True if producing color output. */
    6262static bool utf8 = false;       /** True if producing UTF8 output. */
     
    108108void serial_putchar(wchar_t ch)
    109109{
    110         uint8_t buf[STR_BOUNDS(1)];
     110        char buf[STR_BOUNDS(1)];
    111111        size_t offs;
    112112        size_t i;
     
    294294}
    295295
    296 int lastcol = 0;
    297 int lastrow = 0;
     296unsigned int lastcol = 0;
     297unsigned int lastrow = 0;
    298298
    299299/**
     
    309309
    310310        wchar_t c;
    311         int col, row, w, h;
     311        unsigned int col;
     312        unsigned int row;
     313        unsigned int w;
     314        unsigned int h;
    312315        int i;
    313316
     
    358361                                break;
    359362                        }
    360                         if (col + w > scr_width || row + h > scr_height) {
     363                        if ((col + w > scr_width) || (row + h > scr_height)) {
    361364                                retval = EINVAL;
    362365                                break;
     
    424427                case FB_SCROLL:
    425428                        i = IPC_GET_ARG1(call);
    426                         if ((i > scr_height) || (i < -scr_height)) {
     429                        if ((i > (int) scr_height) || (i < -((int) scr_height))) {
    427430                                retval = EINVAL;
    428431                                break;
  • uspace/srv/hid/kbd/port/msim.c

    r3149fc0 r36e9cd1  
    6464{
    6565        async_set_interrupt_received(msim_irq_handler);
    66         msim_cmds[0].addr = sysinfo_value("kbd.address.virtual");
     66        msim_cmds[0].addr = (void *) sysinfo_value("kbd.address.virtual");
    6767        ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(),
    6868            0, &msim_kbd);
  • uspace/srv/hid/kbd/port/ns16550.c

    r3149fc0 r36e9cd1  
    107107}
    108108
    109 void ns16550_port_yield(void)
    110 {
    111 }
    112 
    113 void ns16550_port_reclaim(void)
    114 {
    115 }
    116 
    117109static void ns16550_irq_handler(ipc_callid_t iid, ipc_call_t *call)
    118110{
  • uspace/srv/hid/kbd/port/sgcn.c

    r3149fc0 r36e9cd1  
    9292
    9393/* polling thread */
    94 static void *sgcn_thread_impl(void *arg);
     94static void sgcn_thread_impl(void *arg);
    9595
    9696static volatile bool polling_disabled = false;
     
    167167 * Thread to poll SGCN for keypresses.
    168168 */
    169 static void *sgcn_thread_impl(void *arg)
     169static void sgcn_thread_impl(void *arg)
    170170{
    171171        (void) arg;
  • uspace/srv/hid/kbd/port/ski.c

    r3149fc0 r36e9cd1  
    4949#define POLL_INTERVAL           10000
    5050
    51 static void *ski_thread_impl(void *arg);
     51static void ski_thread_impl(void *arg);
    5252static int32_t ski_getchar(void);
    5353
     
    8484
    8585/** Thread to poll Ski for keypresses. */
    86 static void *ski_thread_impl(void *arg)
     86static void ski_thread_impl(void *arg)
    8787{
    8888        int32_t c;
  • uspace/srv/hid/kbd/port/z8530.c

    r3149fc0 r36e9cd1  
    9696}
    9797
    98 void z8530_port_yield(void)
    99 {
    100 }
    101 
    102 void z8530_port_reclaim(void)
    103 {
    104 }
    105 
    10698static void z8530_irq_handler(ipc_callid_t iid, ipc_call_t *call)
    10799{
  • uspace/srv/hw/bus/cuda_adb/cuda_adb.c

    r3149fc0 r36e9cd1  
    5555static void cuda_connection(ipc_callid_t iid, ipc_call_t *icall);
    5656static int cuda_init(void);
    57 static int cuda_claim(void);
    5857static void cuda_irq_handler(ipc_callid_t iid, ipc_call_t *call);
    5958
  • uspace/srv/loader/main.c

    r3149fc0 r36e9cd1  
    241241                 * Allocate new filv
    242242                 */
    243                 fdi_node_t **_filv = (fdi_node_t *) malloc((count + 1) * sizeof(fdi_node_t *));
     243                fdi_node_t **_filv = (fdi_node_t **) calloc(count + 1, sizeof(fdi_node_t *));
    244244                if (_filv == NULL) {
    245245                        free(buf);
  • uspace/srv/vfs/vfs.c

    r3149fc0 r36e9cd1  
    7272                ipc_call_t call;
    7373                ipc_callid_t callid = async_get_call(&call);
    74                
    75                 fs_handle_t fs_handle;
    76                 int phone;
    7774               
    7875                switch (IPC_GET_METHOD(call)) {
Note: See TracChangeset for help on using the changeset viewer.