fix cppcheck
This commit is contained in:
parent
161abd76cf
commit
77102723f8
@ -79,41 +79,29 @@ caddr_t _sbrk(int incr)
|
||||
|
||||
int _close(int file)
|
||||
{
|
||||
file = file; /* avoid warning */
|
||||
return -1;
|
||||
}
|
||||
|
||||
int _fstat(int file, struct stat *st)
|
||||
{
|
||||
file = file; /* avoid warning */
|
||||
st->st_mode = S_IFCHR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _isatty(int file)
|
||||
{
|
||||
file = file; /* avoid warning */
|
||||
return 1;
|
||||
}
|
||||
|
||||
int _lseek(int file, int ptr, int dir) {
|
||||
file = file; /* avoid warning */
|
||||
ptr = ptr; /* avoid warning */
|
||||
dir = dir; /* avoid warning */
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _read(int file, char *ptr, int len)
|
||||
{
|
||||
file = file; /* avoid warning */
|
||||
ptr = ptr; /* avoid warning */
|
||||
len = len; /* avoid warning */
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _write(int file, char *ptr, int len) {
|
||||
int todo = todo;
|
||||
file = file; /* avoid warning */
|
||||
// USB_VCOM_Send(ptr, len);
|
||||
return len;
|
||||
}
|
||||
|
@ -103,11 +103,10 @@ int cc110x_write(const struct cc110x *cc110x, const char *buffer,
|
||||
int cc110x_read(const struct cc110x *cc110x, char *buffer, int size)
|
||||
{
|
||||
int ret;
|
||||
unsigned int irq;
|
||||
if((NULL == cc110x) || (NULL == buffer))
|
||||
return (-1);
|
||||
if(0 == cc110x_get_rx_count(cc110x)) {
|
||||
irq = disable_irq();
|
||||
unsigned int irq = disable_irq();
|
||||
current_thread->status = THREAD_STATUS_BLOCKING;
|
||||
current_thread->wakeup_blocking_source = (void*) cc110x;
|
||||
restore_irq(irq);
|
||||
|
@ -101,7 +101,7 @@ int ssd1306_open(const struct ssd1306 *dev)
|
||||
{
|
||||
int ret;
|
||||
ret = i2c_open((struct i2c *)dev->dev);
|
||||
ret = i2c_write(dev->dev, dev->i2c_addr, init_sequence,
|
||||
ret |= i2c_write(dev->dev, dev->i2c_addr, init_sequence,
|
||||
sizeof(init_sequence) / sizeof(init_sequence[0]));
|
||||
ret |= clear(dev);
|
||||
ret |= set_column(dev, 0);
|
||||
|
@ -108,8 +108,6 @@ struct thread_context *thread_create(
|
||||
return NULL;
|
||||
|
||||
thread->pid = threads.count;
|
||||
if(thread->pid < 0)
|
||||
return NULL;
|
||||
thread->stack = stack;
|
||||
thread->stack_size = stack_size;
|
||||
thread->sp = stack_init(thread_func, arg, stack, stack_size);
|
||||
|
Loading…
Reference in New Issue
Block a user