forked from enlightenment/efl
Revert "embryo - embryo_cc - silence some new gcc warnings"
This reverts commit f4ff12406c
.
hmm - it seems this warning silencing didn't work. revisit...
This commit is contained in:
parent
f4ff12406c
commit
e9fcaa7339
|
@ -3032,22 +3032,11 @@ insert_constval(constvalue * prev, constvalue * next, char *name,
|
|||
cell val, short idx)
|
||||
{
|
||||
constvalue *cur;
|
||||
char *s, *d;
|
||||
|
||||
if (!(cur = calloc(1, sizeof(constvalue))))
|
||||
if (!(cur = (constvalue *)malloc(sizeof(constvalue))))
|
||||
error(103); /* insufficient memory (fatal error) */
|
||||
// strncpy(cur->name, name, sizeof(cur->name) - 1);
|
||||
// I'm forced to do the below as new gcc warnings I can't seem to shut up
|
||||
// complain so implement in full to get some silence.
|
||||
for (d = cur->name, s = name; ; )
|
||||
{
|
||||
*d++ = *s;
|
||||
if ((size_t)(s - name) < (size_t)(sizeof(cur->name) - 1))
|
||||
{
|
||||
if (*s) s++;
|
||||
}
|
||||
else break;
|
||||
}
|
||||
memset(cur, 0, sizeof(constvalue));
|
||||
strncpy(cur->name, name, sizeof(cur->name) - 1);
|
||||
cur->name[sizeof(cur->name) - 1] = 0;
|
||||
cur->value = val;
|
||||
cur->index = idx;
|
||||
|
|
|
@ -26,7 +26,7 @@ int strexpand(char *dest, unsigned char *source, int maxlen,
|
|||
|
||||
#define SCPACK_TABLE errstr_table
|
||||
/*-*SCPACK start of pair table, do not change or remove this line */
|
||||
unsigned char errstr_table[128][2] = {
|
||||
unsigned char errstr_table[][2] = {
|
||||
{101, 32}, {116, 32}, {111, 110}, {105, 110}, {97, 114}, {100, 32}, {105,
|
||||
130},
|
||||
{101, 114}, {101, 110}, {115, 32}, {97, 108}, {97, 116}, {117, 110}, {115,
|
||||
|
|
|
@ -29,7 +29,7 @@ int strexpand(char *dest, unsigned char *source, int maxlen,
|
|||
|
||||
#define SCPACK_TABLE sequences_table
|
||||
/*-*SCPACK start of pair table, do not change or remove this line */
|
||||
unsigned char sequences_table[128][2] = {
|
||||
unsigned char sequences_table[][2] = {
|
||||
{32, 37}, {114, 105}, {112, 129}, {46, 130}, {49, 33}, {128, 132}, {97, 100},
|
||||
{46, 97}, {135, 108}, {136, 116}, {111, 134}, {108, 138}, {50, 33}, {115,
|
||||
104},
|
||||
|
|
Loading…
Reference in New Issue