Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove warning because of type and unsigned shift issues #800

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions extracted/plugins/B2DPlugin/src/common/B2DPlugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -13643,6 +13643,7 @@ stepToNextWideBezierInat(sqInt bezier, sqInt yValue)
updateData[GBUpdateY] = lastY;
updateData[GBUpdateDX] = fwDx;
updateData[GBUpdateDY] = fwDy;
((signed)lastX >> 8);
}
else {

Expand Down Expand Up @@ -13672,6 +13673,7 @@ stepToNextWideBezierInat(sqInt bezier, sqInt yValue)
updateData1[GBUpdateY] = lastY1;
updateData1[GBUpdateDX] = fwDx1;
updateData1[GBUpdateDY] = fwDy1;
((signed)lastX1 >> 8);
computeFinalWideBezierValueswidth(bezier, lineWidth);
return 0;
}
Expand Down
12 changes: 6 additions & 6 deletions extracted/plugins/JPEGReadWriter2Plugin/src/common/jdphuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ start_pass_phuff_decoder (j_decompress_ptr cinfo)

#ifdef AVOID_TABLES

#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x))
#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + ((((signed int)((unsigned int)-1))<<(s)) + 1) : (x))

#else

Expand All @@ -211,10 +211,10 @@ static const int extend_test[16] = /* entry n is 2**(n-1) */
0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 };

static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */
{ 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1,
((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1,
((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1,
((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 };
{ 0, (((signed int)((unsigned int)-1))<<1) + 1, (((signed int)((unsigned int)-1))<<2) + 1, (((signed int)((unsigned int)-1))<<3) + 1, (((signed int)((unsigned int)-1))<<4) + 1,
(((signed int)((unsigned int)-1))<<5) + 1, (((signed int)((unsigned int)-1))<<6) + 1, (((signed int)((unsigned int)-1))<<7) + 1, (((signed int)((unsigned int)-1))<<8) + 1,
(((signed int)((unsigned int)-1))<<9) + 1, (((signed int)((unsigned int)-1))<<10) + 1, (((signed int)((unsigned int)-1))<<11) + 1, (((signed int)((unsigned int)-1))<<12) + 1,
(((signed int)((unsigned int)-1))<<13) + 1, (((signed int)((unsigned int)-1))<<14) + 1, (((signed int)((unsigned int)-1))<<15) + 1 };

#endif /* AVOID_TABLES */

Expand Down Expand Up @@ -493,7 +493,7 @@ decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
int Se = cinfo->Se;
int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */
int m1 = (-1) << cinfo->Al; /* -1 in the bit position being coded */
int m1 = ((signed int)((unsigned int)-1)) << cinfo->Al; /* -1 in the bit position being coded */
register int s, k, r;
unsigned int EOBRUN;
JBLOCKROW block;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ static sqInt (*popthenPush)(sqInt nItems, sqInt oop);
static sqInt (*popRemappableOop)(void);
static sqInt (*primitiveFail)(void);
static sqInt (*primitiveFailFor)(sqInt reasonCode);
static sqInt (*push)(sqInt object);
static (*push)(sqInt object);
static sqInt (*pushInteger)(sqInt integerValue);
static sqInt (*pushRemappableOop)(sqInt oop);
static sqInt (*signalSemaphoreWithIndex)(sqInt semaIndex);
Expand Down
15 changes: 8 additions & 7 deletions extracted/vm/include/common/sqVirtualMachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/
#include "interp.h"


#if SPURVM
# define VM_VERSION "5.0"
#else
Expand Down Expand Up @@ -62,9 +63,9 @@ typedef struct VirtualMachine {

sqInt (*pop)(sqInt nItems);
sqInt (*popthenPush)(sqInt nItems, sqInt oop);
sqInt (*push)(sqInt object);
void (*push)(sqInt object);
sqInt (*pushBool)(sqInt trueOrFalse);
sqInt (*pushFloat)(double f);
void (*pushFloat)(double f);
sqInt (*pushInteger)(sqInt integerValue);
double (*stackFloatValue)(sqInt offset);
sqInt (*stackIntegerValue)(sqInt offset);
Expand Down Expand Up @@ -171,7 +172,7 @@ typedef struct VirtualMachine {
# if VM_PROXY_MINOR > 13
/* Reuse these now that Cog provides a production JIT. */
sqInt (*statNumGCs)(void);
sqInt (*stringForCString)(char *nullTerminatedCString);
sqInt (*stringForCString)(const char *nullTerminatedCString);
# else
/* InterpreterProxy methodsFor: 'compiler' */

Expand Down Expand Up @@ -201,7 +202,7 @@ typedef struct VirtualMachine {

sqInt (*classExternalAddress)(void);
void *(*ioLoadModuleOfLength)(sqInt modIndex, sqInt modLength);
void *(*ioLoadSymbolOfLengthFromModule)(sqInt fnIndex, sqInt fnLength, sqInt handle);
void *(*ioLoadSymbolOfLengthFromModule)(sqInt fnIndex, sqInt fnLength, void* handle);
sqInt (*isInMemory)(sqInt address);

#endif
Expand Down Expand Up @@ -234,7 +235,7 @@ typedef struct VirtualMachine {

#if VM_PROXY_MINOR > 5
sqInt (*isArray)(sqInt oop);
void (*forceInterruptCheck)(void);
sqInt (*forceInterruptCheck)(void);
#endif

#if VM_PROXY_MINOR > 6
Expand Down Expand Up @@ -291,7 +292,7 @@ typedef struct VirtualMachine {
#if VM_PROXY_MINOR > 10
void (*addHighPriorityTickee)(void (*ticker)(void), unsigned periodms);
void (*addSynchronousTickee)(void (*ticker)(void), unsigned periodms, unsigned roundms);
volatile usqLong (*utcMicroseconds)(void);
volatile unsigned long long (*utcMicroseconds)(void);
void (*tenuringIncrementalGC)(void);
sqInt (*isYoung) (sqInt anOop);
sqInt (*isKindOfClass)(sqInt oop, sqInt aClass);
Expand Down Expand Up @@ -338,7 +339,7 @@ typedef struct VirtualMachine {

sqInt (*scheduleInMainThread)(sqInt (*closure)());

sqInt (*waitOnExternalSemaphoreIndex)(sqInt semaphoreIndex);
void (*waitOnExternalSemaphoreIndex)(sqInt semaphoreIndex);

} VirtualMachine;

Expand Down