From 56bb636014aaab4ac5dfada6b80fe5c2de820d34 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sun, 26 Jan 2014 17:52:23 +0000 Subject: [PATCH] Change -Og to -O0 in unix-cpy/Makefile; cast to small int in socket.c. --- unix-cpy/Makefile | 4 ++-- unix/Makefile | 2 +- unix/socket.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/unix-cpy/Makefile b/unix-cpy/Makefile index 84fc581e32..985ef15854 100644 --- a/unix-cpy/Makefile +++ b/unix-cpy/Makefile @@ -10,9 +10,9 @@ include ../py/py.mk CFLAGS = -I. -I$(PY_SRC) -Wall -Werror -ansi -std=gnu99 -DUNIX LDFLAGS = -lm -#Debugging/Optimization +# Debugging/Optimization ifdef DEBUG -CFLAGS += -Og -ggdb +CFLAGS += -O0 -g else CFLAGS += -Os #-DNDEBUG endif diff --git a/unix/Makefile b/unix/Makefile index 067a44fcda..75825b7c4c 100644 --- a/unix/Makefile +++ b/unix/Makefile @@ -13,7 +13,7 @@ include ../py/py.mk CFLAGS = -I. -I$(PY_SRC) -Wall -Werror -ansi -std=gnu99 -DUNIX LDFLAGS = -lm -#Debugging/Optimization +# Debugging/Optimization ifdef DEBUG CFLAGS += -O0 -g else diff --git a/unix/socket.c b/unix/socket.c index d4d7b29b52..6f7954522b 100644 --- a/unix/socket.c +++ b/unix/socket.c @@ -362,6 +362,6 @@ void rawsocket_init() { #endif rt_store_attr(m, MP_QSTR_getaddrinfo, (mp_obj_t)&mod_socket_getaddrinfo_obj); for (struct sym_entry *p = constants; p->sym != NULL; p++) { - rt_store_attr(m, QSTR_FROM_STR_STATIC(p->sym), MP_OBJ_NEW_SMALL_INT(p->val)); + rt_store_attr(m, QSTR_FROM_STR_STATIC(p->sym), MP_OBJ_NEW_SMALL_INT((machine_int_t)p->val)); } }