1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

Fixing warnings found by lii6gc build.

Copied from Perforce
 Change: 179149
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Richard Brooksby 2012-08-31 21:27:55 +01:00
parent 46b61473a9
commit fbe4595319
5 changed files with 10 additions and 21 deletions

View file

@ -155,9 +155,10 @@ Res EventInit(void)
AVER(Event##name##Code == code); \
AVER(0 <= code && code <= EventCodeMAX); \
AVER(sizeof(#name) - 1 <= EventNameMAX); \
AVER(Event##name##Always == always); \
AVER((Bool)Event##name##Always == always); \
AVERT(Bool, always); \
AVER(0 <= Event##name##Kind && Event##name##Kind < EventKindLIMIT); \
AVER(0 <= Event##name##Kind); \
AVER((EventKind)Event##name##Kind < EventKindLIMIT); \
EVENT_##name##_PARAMS(EVENT_PARAM_CHECK, name)
EVENT_LIST(EVENT_CHECK, X)

View file

@ -422,7 +422,6 @@ static void readLog(EventProc proc)
}
while (TRUE) { /* loop for each event */
char *eventFormat;
Event event;
EventCode code;
Res res;
@ -449,11 +448,6 @@ static void readLog(EventProc proc)
/* Output event. */
if (verbose) {
size_t argCount;
eventFormat = EventCode2Format(code);
argCount = strlen(eventFormat);
if (eventFormat[0] == '0') argCount = 0;
if (style == 'L') putchar('(');
switch (style) {

View file

@ -109,7 +109,7 @@ typedef mps_clock_t EventClock;
* They are small enough to be able to be used as members of a bit set.
*/
enum {
enum EventKindEnum {
EventKindArena, /* Per space or arena */
EventKindPool, /* Per pool */
EventKindTrace, /* Per trace or scan */
@ -129,13 +129,14 @@ enum {
/* Note that enum values can be up to fifteen bits long portably. */
#define EVENT_ENUM(X, name, code, always, kind) \
enum { \
Event##name##Code = code, \
Event##name##Always = always, \
Event##name##Kind = EventKind##kind \
};
Event##name##Kind = EventKind##kind,
EVENT_LIST(EVENT_ENUM, X)
enum EventDefinitionsEnum {
EVENT_LIST(EVENT_ENUM, X)
EventEnumWarningSuppressor
};
/* Event*Struct -- Event Structures

View file

@ -234,20 +234,14 @@ char *LabelText(EventProc proc, Word id)
Res EventRead(Event *eventReturn, EventProc proc)
{
size_t eventIndex;
Res res;
EventAnyStruct anyStruct;
Event event;
void *restOfEvent;
res = proc->reader(proc->readerP, &anyStruct, sizeof(anyStruct));
if (res != ResOK)
return res;
eventIndex = eventCode2Index(anyStruct.code, TRUE);
assert(anyStruct.code == EventInternCode ||
anyStruct.size == eventTypes[eventIndex].size);
if (proc->cachedEvent != NULL) {
event = proc->cachedEvent;
proc->cachedEvent = NULL;
@ -259,7 +253,6 @@ Res EventRead(Event *eventReturn, EventProc proc)
}
event->any = anyStruct;
restOfEvent = PointerAdd(event, sizeof(anyStruct));
res = proc->reader(proc->readerP,
PointerAdd(event, sizeof(anyStruct)),
anyStruct.size - sizeof(anyStruct));

View file

@ -17,7 +17,7 @@
typedef int Bool; /* <design/type/#bool> */
enum {
enum BoolEnum {
FALSE = 0,
TRUE = 1
};