Created
November 5, 2021 11:32
-
-
Save X547/26e82c96c74dca613ca5cbe1c8d4a9aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 05ad4edd3ae1e2c84d363e6db1b2c474b68f6f44 Mon Sep 17 00:00:00 2001 | |
From: X512 <danger_mail@list.ru> | |
Date: Thu, 4 Nov 2021 00:51:36 +0900 | |
Subject: [PATCH] [wip] GCC 11 fixes | |
Change-Id: I50d0c6843ffaf6eb2fd98cb3855a34af7f10a99c | |
--- | |
build/jam/ArchitectureRules | 6 +- | |
build/jam/repositories/HaikuPorts/x86_64 | 8 +- | |
headers/compatibility/bsd/err.h | 2 +- | |
headers/libs/agg/agg_image_accessors.h | 4 +- | |
headers/libs/agg/agg_trans_affine.h | 10 +- | |
headers/posix/stdlib.h | 4 +- | |
headers/private/interface/RegionSupport.h | 24 +-- | |
.../accelerants/matrox/engine/mga_dac.c | 2 +- | |
.../accelerants/nvidia/engine/nv_dac.c | 2 +- | |
.../accelerants/nvidia/engine/nv_dac2.c | 2 +- | |
src/add-ons/accelerants/radeon_hd/hooks.cpp | 2 +- | |
src/add-ons/accelerants/via/engine/dac.c | 2 +- | |
src/add-ons/accelerants/via/engine/dac2.c | 2 +- | |
.../kernel/bus_managers/random/yarrow_rng.cpp | 8 +- | |
.../media/media-add-ons/mixer/Interpolate.cpp | 12 +- | |
.../media/media-add-ons/mixer/MixerCore.cpp | 8 +- | |
.../media/media-add-ons/mixer/MixerUtils.cpp | 6 +- | |
.../media/media-add-ons/mixer/Resampler.cpp | 14 +- | |
.../plugins/raw_decoder/AudioConversion.cpp | 12 +- | |
.../print/drivers/pcl6/PCL6Rasterizer.cpp | 6 +- | |
.../print/transports/lpr/LpsClient.cpp | 16 +- | |
src/add-ons/print/transports/lpr/LpsClient.h | 20 +-- | |
src/add-ons/screen_savers/ifs/IFS.cpp | 2 +- | |
src/add-ons/translators/exr/EXRGamma.cpp | 1 - | |
src/add-ons/translators/rtf/RTF.cpp | 17 +- | |
src/add-ons/translators/rtf/RTF.h | 12 +- | |
src/add-ons/translators/rtf/convert.cpp | 14 +- | |
.../wonderbrush/support/blending.h | 2 +- | |
src/apps/mail/WIndex.cpp | 6 +- | |
src/apps/terminal/Jamfile | 2 + | |
src/bin/setmime.cpp | 28 +-- | |
src/build/libroot/fs_descriptors.cpp | 6 + | |
src/kits/interface/RegionSupport.cpp | 162 +++++++++--------- | |
src/kits/media/experimental/MediaClient.cpp | 0 | |
src/preferences/mail/DNSQuery.cpp | 6 +- | |
src/preferences/time/ZoneView.cpp | 3 + | |
.../bitmap_painter/DrawBitmapBilinear.h | 16 +- | |
.../DrawBitmapNearestNeighbor.h | 4 +- | |
src/system/kernel/slab/allocator.cpp | 10 ++ | |
src/tests/kits/interface/picture/Jamfile | 2 +- | |
40 files changed, 240 insertions(+), 225 deletions(-) | |
mode change 100755 => 100644 src/kits/media/experimental/MediaClient.cpp | |
diff --git a/build/jam/ArchitectureRules b/build/jam/ArchitectureRules | |
index 0a0e28a527..c363b40899 100644 | |
--- a/build/jam/ArchitectureRules | |
+++ b/build/jam/ArchitectureRules | |
@@ -122,7 +122,7 @@ rule ArchitectureSetup architecture | |
# TODO: Remove all these. | |
HAIKU_WERROR_FLAGS_$(architecture) += -Wno-error=unused-but-set-variable | |
-Wno-error=deprecated -Wno-error=deprecated-declarations | |
- -Wno-error=cpp -Wno-error=trigraphs ; | |
+ -Wno-error=cpp -Wno-error=trigraphs -Wno-error=address-of-packed-member -Wno-error=class-memaccess -Wno-error=maybe-uninitialized -Wno-error=free-nonheap-object -Wno-error=stringop-overread -Wno-error=array-bounds ; | |
# But these can stay. | |
HAIKU_WERROR_FLAGS_$(architecture) += -Wno-error=cast-align | |
-Wno-error=format-truncation ; | |
@@ -288,8 +288,8 @@ rule KernelArchitectureSetup architecture | |
case x86_64 : | |
# x86_64 completely shares the x86 bootloader for MBR. | |
- HAIKU_KERNEL_PLATFORM ?= bios_ia32 ; | |
- HAIKU_BOOT_TARGETS += bios_ia32 efi pxe_ia32 ; | |
+ HAIKU_KERNEL_PLATFORM ?= efi ; | |
+ HAIKU_BOOT_TARGETS += efi ; | |
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 2880 ; # in kB | |
# offset in floppy image (>= sizeof(haiku_loader)) | |
diff --git a/build/jam/repositories/HaikuPorts/x86_64 b/build/jam/repositories/HaikuPorts/x86_64 | |
index 32e08ca3a5..769cd47bf8 100644 | |
--- a/build/jam/repositories/HaikuPorts/x86_64 | |
+++ b/build/jam/repositories/HaikuPorts/x86_64 | |
@@ -57,9 +57,9 @@ RemotePackageRepository HaikuPorts | |
game_music_emu_devel-0.6.3-1 | |
gettext-0.19.8.1-7 | |
gettext_libintl-0.19.8.1-7 | |
- gcc-8.3.0_2019_05_24-13 | |
- gcc_syslibs-8.3.0_2019_05_24-13 | |
- gcc_syslibs_devel-8.3.0_2019_05_24-13 | |
+ gcc-11.1.0_2021_04_27-1 | |
+ gcc_syslibs-11.1.0_2021_04_27-1 | |
+ gcc_syslibs_devel-11.1.0_2021_04_27-1 | |
giflib-5.2.1-1 | |
giflib_devel-5.2.1-1 | |
git-2.30.2-2 | |
@@ -177,7 +177,7 @@ RemotePackageRepository HaikuPorts | |
openexr_devel-2.4.1-1 | |
openjpeg-2.4.0-1 | |
openjpeg_devel-2.4.0-1 | |
- openssh-8.6p1-2 | |
+ openssh-8.6p1-3 | |
openssl-1.1.1l-1 | |
openssl_devel-1.1.1l-1 | |
opus-1.3.1-1 | |
diff --git a/headers/compatibility/bsd/err.h b/headers/compatibility/bsd/err.h | |
index 64a086c26c..04884b2d4a 100644 | |
--- a/headers/compatibility/bsd/err.h | |
+++ b/headers/compatibility/bsd/err.h | |
@@ -69,7 +69,7 @@ void vwarn(const char *, __va_list) __printf0like(1, 0); | |
void warnc(int, const char *, ...) __printf0like(2, 3); | |
void vwarnc(int, const char *, __va_list) __printf0like(2, 0); | |
void warnx(const char *, ...) __printflike(1, 2); | |
-void vwarnx(const char *, __va_list) __printflike(1, 0); | |
+void vwarnx(const char *, __va_list); | |
void err_set_file(void *); | |
void err_set_exit(void (*)(int)); | |
__END_DECLS | |
diff --git a/headers/libs/agg/agg_image_accessors.h b/headers/libs/agg/agg_image_accessors.h | |
index d551dbc624..c1d9b05694 100644 | |
--- a/headers/libs/agg/agg_image_accessors.h | |
+++ b/headers/libs/agg/agg_image_accessors.h | |
@@ -169,8 +169,8 @@ namespace agg | |
private: | |
AGG_INLINE const int8u* pixel() const | |
{ | |
- register int x = m_x; | |
- register int y = m_y; | |
+ int x = m_x; | |
+ int y = m_y; | |
if(x < 0) x = 0; | |
if(y < 0) y = 0; | |
if(x >= (int)m_pixf->width()) x = m_pixf->width() - 1; | |
diff --git a/headers/libs/agg/agg_trans_affine.h b/headers/libs/agg/agg_trans_affine.h | |
index b3304e9a32..a9fa628aa8 100644 | |
--- a/headers/libs/agg/agg_trans_affine.h | |
+++ b/headers/libs/agg/agg_trans_affine.h | |
@@ -278,7 +278,7 @@ namespace agg | |
//------------------------------------------------------------------------ | |
inline void trans_affine::transform(double* x, double* y) const | |
{ | |
- register double tx = *x; | |
+ double tx = *x; | |
*x = tx * m0 + *y * m2 + m4; | |
*y = tx * m1 + *y * m3 + m5; | |
} | |
@@ -286,7 +286,7 @@ namespace agg | |
//------------------------------------------------------------------------ | |
inline void trans_affine::transform_2x2(double* x, double* y) const | |
{ | |
- register double tx = *x; | |
+ double tx = *x; | |
*x = tx * m0 + *y * m2; | |
*y = tx * m1 + *y * m3; | |
} | |
@@ -294,9 +294,9 @@ namespace agg | |
//------------------------------------------------------------------------ | |
inline void trans_affine::inverse_transform(double* x, double* y) const | |
{ | |
- register double d = determinant(); | |
- register double a = (*x - m4) * d; | |
- register double b = (*y - m5) * d; | |
+ double d = determinant(); | |
+ double a = (*x - m4) * d; | |
+ double b = (*y - m5) * d; | |
*x = a * m3 - b * m2; | |
*y = b * m0 - a * m1; | |
} | |
diff --git a/headers/posix/stdlib.h b/headers/posix/stdlib.h | |
index 9ab024e472..733909ddaf 100644 | |
--- a/headers/posix/stdlib.h | |
+++ b/headers/posix/stdlib.h | |
@@ -49,9 +49,9 @@ extern void *calloc(size_t numElements, size_t size); | |
extern void free(void *pointer); | |
extern void *malloc(size_t size); | |
extern int posix_memalign(void **_pointer, size_t alignment, size_t size); | |
-#ifdef _ISOC11_SOURCE | |
+//#ifdef _ISOC11_SOURCE | |
extern void *aligned_alloc(size_t alignment, size_t size) _ALIGNED_BY_ARG(1); | |
-#endif | |
+//#endif | |
extern void *realloc(void *oldPointer, size_t newSize); | |
/* process termination */ | |
diff --git a/headers/private/interface/RegionSupport.h b/headers/private/interface/RegionSupport.h | |
index 6cb5984c27..5512baed7e 100644 | |
--- a/headers/private/interface/RegionSupport.h | |
+++ b/headers/private/interface/RegionSupport.h | |
@@ -111,7 +111,7 @@ class BRegion::Support { | |
BRegion* pReg, | |
clipping_rect* r1, | |
clipping_rect* r1End, | |
- register clipping_rect* r2, | |
+ clipping_rect* r2, | |
clipping_rect* r2End, | |
int top, | |
int bottom); | |
@@ -126,26 +126,26 @@ class BRegion::Support { | |
static void miRegionOp(BRegion* newReg, | |
const BRegion* reg1, const BRegion* reg2, | |
int (*overlapFunc)( | |
- register BRegion* pReg, | |
- register clipping_rect* r1, | |
+ BRegion* pReg, | |
+ clipping_rect* r1, | |
clipping_rect* r1End, | |
- register clipping_rect* r2, | |
+ clipping_rect* r2, | |
clipping_rect* r2End, | |
int top, | |
int bottom), | |
int (*nonOverlap1Func)( | |
- register BRegion* pReg, | |
- register clipping_rect* r, | |
+ BRegion* pReg, | |
+ clipping_rect* r, | |
clipping_rect* rEnd, | |
- register int top, | |
- register int bottom), | |
+ int top, | |
+ int bottom), | |
int (*nonOverlap2Func)( | |
- register BRegion* pReg, | |
- register clipping_rect* r, | |
+ BRegion* pReg, | |
+ clipping_rect* r, | |
clipping_rect* rEnd, | |
- register int top, | |
- register int bottom)); | |
+ int top, | |
+ int bottom)); | |
}; | |
diff --git a/src/add-ons/accelerants/matrox/engine/mga_dac.c b/src/add-ons/accelerants/matrox/engine/mga_dac.c | |
index aa9f59d07f..36b44a339c 100644 | |
--- a/src/add-ons/accelerants/matrox/engine/mga_dac.c | |
+++ b/src/add-ons/accelerants/matrox/engine/mga_dac.c | |
@@ -143,7 +143,7 @@ status_t gx00_dac_mode(int mode,float brightness) | |
} | |
/*program the DAC palette using the given r,g,b values*/ | |
-status_t gx00_dac_palette(uint8 r[256],uint8 g[256],uint8 b[256]) | |
+status_t gx00_dac_palette(uint8 r[],uint8 g[],uint8 b[]) | |
{ | |
int i; | |
diff --git a/src/add-ons/accelerants/nvidia/engine/nv_dac.c b/src/add-ons/accelerants/nvidia/engine/nv_dac.c | |
index 4cb020b4ba..88e85aadd5 100644 | |
--- a/src/add-ons/accelerants/nvidia/engine/nv_dac.c | |
+++ b/src/add-ons/accelerants/nvidia/engine/nv_dac.c | |
@@ -145,7 +145,7 @@ status_t nv_dac_dither(bool dither) | |
} | |
/*program the DAC palette using the given r,g,b values*/ | |
-status_t nv_dac_palette(uint8 r[256],uint8 g[256],uint8 b[256]) | |
+status_t nv_dac_palette(uint8 r[],uint8 g[],uint8 b[]) | |
{ | |
int i; | |
diff --git a/src/add-ons/accelerants/nvidia/engine/nv_dac2.c b/src/add-ons/accelerants/nvidia/engine/nv_dac2.c | |
index a3cde653fa..6f89b4ad52 100644 | |
--- a/src/add-ons/accelerants/nvidia/engine/nv_dac2.c | |
+++ b/src/add-ons/accelerants/nvidia/engine/nv_dac2.c | |
@@ -110,7 +110,7 @@ status_t nv_dac2_mode(int mode,float brightness) | |
} | |
/*program the DAC palette using the given r,g,b values*/ | |
-status_t nv_dac2_palette(uint8 r[256],uint8 g[256],uint8 b[256]) | |
+status_t nv_dac2_palette(uint8 r[],uint8 g[],uint8 b[]) | |
{ | |
int i; | |
diff --git a/src/add-ons/accelerants/radeon_hd/hooks.cpp b/src/add-ons/accelerants/radeon_hd/hooks.cpp | |
index 0038ff18d5..d0ed506987 100644 | |
--- a/src/add-ons/accelerants/radeon_hd/hooks.cpp | |
+++ b/src/add-ons/accelerants/radeon_hd/hooks.cpp | |
@@ -15,7 +15,7 @@ | |
extern "C" void* | |
get_accelerant_hook(uint32 feature, void* data) | |
{ | |
- switch (feature) { | |
+ switch ((int)feature) { | |
/* general */ | |
case B_INIT_ACCELERANT: | |
return (void*)radeon_init_accelerant; | |
diff --git a/src/add-ons/accelerants/via/engine/dac.c b/src/add-ons/accelerants/via/engine/dac.c | |
index 497873127a..23823b00b8 100644 | |
--- a/src/add-ons/accelerants/via/engine/dac.c | |
+++ b/src/add-ons/accelerants/via/engine/dac.c | |
@@ -96,7 +96,7 @@ status_t eng_dac_mode(int mode,float brightness) | |
} | |
/*program the DAC palette using the given r,g,b values*/ | |
-status_t eng_dac_palette(uint8 r[256],uint8 g[256],uint8 b[256]) | |
+status_t eng_dac_palette(uint8 r[],uint8 g[],uint8 b[]) | |
{ | |
int i; | |
LOG(4,("DAC: setting palette\n")); | |
diff --git a/src/add-ons/accelerants/via/engine/dac2.c b/src/add-ons/accelerants/via/engine/dac2.c | |
index 5dada8b36e..ef5016d223 100644 | |
--- a/src/add-ons/accelerants/via/engine/dac2.c | |
+++ b/src/add-ons/accelerants/via/engine/dac2.c | |
@@ -99,7 +99,7 @@ status_t eng_dac2_mode(int mode,float brightness) | |
} | |
/*program the DAC palette using the given r,g,b values*/ | |
-status_t eng_dac2_palette(uint8 r[256],uint8 g[256],uint8 b[256]) | |
+status_t eng_dac2_palette(uint8 r[],uint8 g[],uint8 b[]) | |
{ | |
int i; | |
diff --git a/src/add-ons/kernel/bus_managers/random/yarrow_rng.cpp b/src/add-ons/kernel/bus_managers/random/yarrow_rng.cpp | |
index fe34c32336..129f07c378 100644 | |
--- a/src/add-ons/kernel/bus_managers/random/yarrow_rng.cpp | |
+++ b/src/add-ons/kernel/bus_managers/random/yarrow_rng.cpp | |
@@ -71,8 +71,8 @@ static inline void | |
attach(OCTET *y, const OCTET *x, const uint32 anyA, const uint32 anyB, | |
const uint32 oddC, const uint32 oddD) | |
{ | |
- register OCTET _x; | |
- register OCTET _y; | |
+ OCTET _x; | |
+ OCTET _y; | |
_x.D[0] = x->D[0]; | |
_x.D[1] = x->D[1]; | |
@@ -95,8 +95,8 @@ static inline void | |
detach(OCTET *y, const OCTET *x, const uint32 sameA, const uint32 sameB, | |
const uint32 invoddC, const uint32 invoddD) | |
{ | |
- register OCTET _x; | |
- register OCTET _y; | |
+ OCTET _x; | |
+ OCTET _y; | |
_x.D[0] = x->D[0]; | |
_x.D[1] = x->D[1]; | |
diff --git a/src/add-ons/media/media-add-ons/mixer/Interpolate.cpp b/src/add-ons/media/media-add-ons/mixer/Interpolate.cpp | |
index 36cda95ef9..0fb48f995d 100644 | |
--- a/src/add-ons/media/media-add-ons/mixer/Interpolate.cpp | |
+++ b/src/add-ons/media/media-add-ons/mixer/Interpolate.cpp | |
@@ -25,10 +25,10 @@ kernel(Resampler* object, const void *_src, int32 srcSampleOffset, | |
int32 srcSampleCount, void *_dest, int32 destSampleOffset, | |
int32 destSampleCount, float _gain) | |
{ | |
- register const char * src = (const char *)_src; | |
- register char * dest = (char *)_dest; | |
- register int32 count = destSampleCount; | |
- register float gain = _gain * gnum / gden; | |
+ const char * src = (const char *)_src; | |
+ char * dest = (char *)_dest; | |
+ int32 count = destSampleCount; | |
+ float gain = _gain * gnum / gden; | |
if (srcSampleCount == destSampleCount) { | |
// optimized case for no resampling | |
@@ -46,8 +46,8 @@ kernel(Resampler* object, const void *_src, int32 srcSampleOffset, | |
return; | |
} | |
- register float delta = float(srcSampleCount) / float(destSampleCount); | |
- register float current = 0.0f; | |
+ float delta = float(srcSampleCount) / float(destSampleCount); | |
+ float current = 0.0f; | |
float oldSample = ((Interpolate*)object)->fOldSample; | |
#define SRC *(const inType*)(src) | |
diff --git a/src/add-ons/media/media-add-ons/mixer/MixerCore.cpp b/src/add-ons/media/media-add-ons/mixer/MixerCore.cpp | |
index 7c87a76cdd..6e1632cf56 100644 | |
--- a/src/add-ons/media/media-add-ons/mixer/MixerCore.cpp | |
+++ b/src/add-ons/media/media-add-ons/mixer/MixerCore.cpp | |
@@ -655,10 +655,10 @@ MixerCore::_MixThread() | |
uint32 dstSampleOffset | |
= fMixBufferChannelCount * sizeof(float); | |
uint32 srcSampleOffset = info->sample_offset; | |
- register char* dst = (char*)&fMixBuffer[channel]; | |
- register char* src = (char*)info->base; | |
- register float gain = info->gain; | |
- register int j = fMixBufferFrameCount; | |
+ char* dst = (char*)&fMixBuffer[channel]; | |
+ char* src = (char*)info->base; | |
+ float gain = info->gain; | |
+ int j = fMixBufferFrameCount; | |
do { | |
*(float*)dst += *(const float*)src * gain; | |
dst += dstSampleOffset; | |
diff --git a/src/add-ons/media/media-add-ons/mixer/MixerUtils.cpp b/src/add-ons/media/media-add-ons/mixer/MixerUtils.cpp | |
index a050bea7eb..f8a8b0eead 100644 | |
--- a/src/add-ons/media/media-add-ons/mixer/MixerUtils.cpp | |
+++ b/src/add-ons/media/media-add-ons/mixer/MixerUtils.cpp | |
@@ -209,9 +209,9 @@ HasKawamba() | |
void | |
ZeroFill(float *_dst, int32 _dst_sample_offset, int32 _sample_count) | |
{ | |
- register char * dst = (char *) _dst; | |
- register int32 sample_count = _sample_count; | |
- register int32 dst_sample_offset = _dst_sample_offset; | |
+ char * dst = (char *) _dst; | |
+ int32 sample_count = _sample_count; | |
+ int32 dst_sample_offset = _dst_sample_offset; | |
while (sample_count--) { | |
*(float *)dst = 0.0f; | |
dst += dst_sample_offset; | |
diff --git a/src/add-ons/media/media-add-ons/mixer/Resampler.cpp b/src/add-ons/media/media-add-ons/mixer/Resampler.cpp | |
index 1268527e18..b9edabf302 100644 | |
--- a/src/add-ons/media/media-add-ons/mixer/Resampler.cpp | |
+++ b/src/add-ons/media/media-add-ons/mixer/Resampler.cpp | |
@@ -25,10 +25,10 @@ kernel(Resampler* object, const void *_src, int32 srcSampleOffset, | |
int32 srcSampleCount, void *_dest, int32 destSampleOffset, | |
int32 destSampleCount, float _gain) | |
{ | |
- register const char * src = (const char *)_src; | |
- register char * dest = (char *)_dest; | |
- register int32 count = destSampleCount; | |
- register float gain = _gain * gnum / gden; | |
+ const char * src = (const char *)_src; | |
+ char * dest = (char *)_dest; | |
+ int32 count = destSampleCount; | |
+ float gain = _gain * gnum / gden; | |
if (srcSampleCount == destSampleCount) { | |
// optimized case for no resampling | |
@@ -46,8 +46,8 @@ kernel(Resampler* object, const void *_src, int32 srcSampleOffset, | |
return; | |
} | |
- register float delta = float(srcSampleCount) / float(destSampleCount); | |
- register float current = 0.0f; | |
+ float delta = float(srcSampleCount) / float(destSampleCount); | |
+ float current = 0.0f; | |
// downsample | |
while (count--) { | |
@@ -61,7 +61,7 @@ kernel(Resampler* object, const void *_src, int32 srcSampleOffset, | |
dest += destSampleOffset; | |
current += delta; | |
- register int32 skipcount = (int32)current; | |
+ int32 skipcount = (int32)current; | |
current -= skipcount; | |
src += skipcount * srcSampleOffset; | |
} | |
diff --git a/src/add-ons/media/plugins/raw_decoder/AudioConversion.cpp b/src/add-ons/media/plugins/raw_decoder/AudioConversion.cpp | |
index 8a619bbf12..5e3c83cc76 100644 | |
--- a/src/add-ons/media/plugins/raw_decoder/AudioConversion.cpp | |
+++ b/src/add-ons/media/plugins/raw_decoder/AudioConversion.cpp | |
@@ -127,9 +127,9 @@ private: | |
#define CONVERT(src_type, dst_type) \ | |
void src_type##_to_##dst_type (void *dst, const void *src, int32 count) \ | |
{ \ | |
- register const src_type##_sample *s = (const src_type##_sample *) src; \ | |
- register dst_type *d = (dst_type *) dst; \ | |
- register int32 c = count >> 4; \ | |
+ const src_type##_sample *s = (const src_type##_sample *) src; \ | |
+ dst_type *d = (dst_type *) dst; \ | |
+ int32 c = count >> 4; \ | |
if (!c) goto fin1; \ | |
do { \ | |
d[0] = s[0]; d[1] = s[1]; \ | |
@@ -204,12 +204,12 @@ swap_int16(void *data, int32 count) | |
void | |
swap_int24(void *data, int32 count) | |
{ | |
- register int32 c = count; | |
- register uint8 *d = (uint8 *)data; | |
+ int32 c = count; | |
+ uint8 *d = (uint8 *)data; | |
if (!c) | |
return; | |
do { | |
- register uint8 temp = d[0]; | |
+ uint8 temp = d[0]; | |
d[0] = d[2]; | |
d[2] = temp; | |
d += 3; | |
diff --git a/src/add-ons/print/drivers/pcl6/PCL6Rasterizer.cpp b/src/add-ons/print/drivers/pcl6/PCL6Rasterizer.cpp | |
index 72fa299e7a..0cfd1561b9 100644 | |
--- a/src/add-ons/print/drivers/pcl6/PCL6Rasterizer.cpp | |
+++ b/src/add-ons/print/drivers/pcl6/PCL6Rasterizer.cpp | |
@@ -209,12 +209,12 @@ ColorRasterizer::MergePlaneBuffersToCurrentLine() | |
remainingPixels -= pixels; | |
if (remainingPixels >= 8) { | |
- register const uchar | |
+ const uchar | |
red = fPlaneBuffers[0][i], | |
green = fPlaneBuffers[1][i], | |
blue = fPlaneBuffers[2][i]; | |
- register uchar value = 0; | |
+ uchar value = 0; | |
if (red & 0x80) value = 0x80; | |
if (red & 0x40) value |= 0x10; | |
if (red & 0x20) value |= 0x02; | |
@@ -255,7 +255,7 @@ ColorRasterizer::MergePlaneBuffersToCurrentLine() | |
*out++ = value; | |
} else { | |
- register const uchar | |
+ const uchar | |
red = fPlaneBuffers[0][i], | |
green = fPlaneBuffers[1][i], | |
blue = fPlaneBuffers[2][i]; | |
diff --git a/src/add-ons/print/transports/lpr/LpsClient.cpp b/src/add-ons/print/transports/lpr/LpsClient.cpp | |
index 9576a0ecf7..2ad5a1db98 100644 | |
--- a/src/add-ons/print/transports/lpr/LpsClient.cpp | |
+++ b/src/add-ons/print/transports/lpr/LpsClient.cpp | |
@@ -57,7 +57,7 @@ LpsClient::~LpsClient() | |
void | |
-LpsClient::connect() throw(LPSException) | |
+LpsClient::connect() | |
{ | |
for (int localPort = LPS_CLIENT_PORT_S; localPort <= LPS_CLIENT_PORT_E; | |
localPort++) { | |
@@ -90,7 +90,7 @@ LpsClient::close() | |
void | |
-LpsClient::receiveJob(const char *printer) throw(LPSException) | |
+LpsClient::receiveJob(const char *printer) | |
{ | |
if (fConnected) { | |
*fOutput << LPS_PRINT_JOB << printer << '\n' << flush; | |
@@ -100,7 +100,7 @@ LpsClient::receiveJob(const char *printer) throw(LPSException) | |
void | |
-LpsClient::receiveControlFile(int size, const char *name) throw(LPSException) | |
+LpsClient::receiveControlFile(int size, const char *name) | |
{ | |
if (fConnected) { | |
@@ -115,7 +115,7 @@ LpsClient::receiveControlFile(int size, const char *name) throw(LPSException) | |
} | |
void | |
-LpsClient::receiveDataFile(int size, const char *name) throw(LPSException) | |
+LpsClient::receiveDataFile(int size, const char *name) | |
{ | |
if (fConnected) { | |
@@ -131,7 +131,7 @@ LpsClient::receiveDataFile(int size, const char *name) throw(LPSException) | |
void | |
-LpsClient::transferData(const char *buffer, int size) throw(LPSException) | |
+LpsClient::transferData(const char *buffer, int size) | |
{ | |
if (fConnected) { | |
@@ -148,7 +148,7 @@ LpsClient::transferData(const char *buffer, int size) throw(LPSException) | |
void | |
-LpsClient::transferData(istream &is, int size) throw(LPSException) | |
+LpsClient::transferData(istream &is, int size) | |
{ | |
if (fConnected) { | |
@@ -171,7 +171,7 @@ LpsClient::transferData(istream &is, int size) throw(LPSException) | |
void | |
-LpsClient::endTransfer() throw(LPSException) | |
+LpsClient::endTransfer() | |
{ | |
if (fConnected) { | |
*fOutput << LPS_END_TRANSFER << flush; | |
@@ -181,7 +181,7 @@ LpsClient::endTransfer() throw(LPSException) | |
void | |
-LpsClient::checkAck() throw(LPSException) | |
+LpsClient::checkAck() | |
{ | |
if (fConnected) { | |
diff --git a/src/add-ons/print/transports/lpr/LpsClient.h b/src/add-ons/print/transports/lpr/LpsClient.h | |
index 3a790e1efd..15bd6a7ae0 100644 | |
--- a/src/add-ons/print/transports/lpr/LpsClient.h | |
+++ b/src/add-ons/print/transports/lpr/LpsClient.h | |
@@ -37,19 +37,15 @@ class LpsClient { | |
public: | |
LpsClient(const char* host); | |
~LpsClient(); | |
- void connect() throw(LPSException); | |
+ void connect(); | |
void close(); | |
- void receiveJob(const char* queue) throw(LPSException); | |
- void receiveControlFile(int cfsize, const char* cfname) | |
- throw(LPSException); | |
- void receiveDataFile(int dfsize, const char* dfname) | |
- throw(LPSException); | |
- void transferData(const char* buffer, int size = -1) | |
- throw(LPSException); | |
- void transferData(istream& is, int size = -1) | |
- throw(LPSException); | |
- void endTransfer() throw(LPSException); | |
- void checkAck() throw(LPSException); | |
+ void receiveJob(const char* queue); | |
+ void receiveControlFile(int cfsize, const char* cfname); | |
+ void receiveDataFile(int dfsize, const char* dfname); | |
+ void transferData(const char* buffer, int size = -1); | |
+ void transferData(istream& is, int size = -1); | |
+ void endTransfer(); | |
+ void checkAck(); | |
private: | |
bool fConnected; | |
diff --git a/src/add-ons/screen_savers/ifs/IFS.cpp b/src/add-ons/screen_savers/ifs/IFS.cpp | |
index 8af148ef10..7536913ede 100644 | |
--- a/src/add-ons/screen_savers/ifs/IFS.cpp | |
+++ b/src/add-ons/screen_savers/ifs/IFS.cpp | |
@@ -72,7 +72,7 @@ static int i2; | |
unsigned int | |
ya_random(void) | |
{ | |
- register int ret = a[i1] + a[i2]; | |
+ int ret = a[i1] + a[i2]; | |
a[i1] = ret; | |
if (++i1 >= VECTOR_SIZE) | |
i1 = 0; | |
diff --git a/src/add-ons/translators/exr/EXRGamma.cpp b/src/add-ons/translators/exr/EXRGamma.cpp | |
index 639600592c..a7e0f43691 100644 | |
--- a/src/add-ons/translators/exr/EXRGamma.cpp | |
+++ b/src/add-ons/translators/exr/EXRGamma.cpp | |
@@ -11,7 +11,6 @@ | |
#include <algorithm> | |
using namespace std; | |
-using Imath::clamp; | |
float | |
diff --git a/src/add-ons/translators/rtf/RTF.cpp b/src/add-ons/translators/rtf/RTF.cpp | |
index ea4663ce55..f7ed622ccb 100644 | |
--- a/src/add-ons/translators/rtf/RTF.cpp | |
+++ b/src/add-ons/translators/rtf/RTF.cpp | |
@@ -33,15 +33,15 @@ static const char *kDestinationControlWords[] = { | |
"rxe", "stylesheet", "subject", "tc", "title", "txe", "xe", | |
}; | |
-static char read_char(BDataIO &stream, bool endOfFileAllowed = false) throw (status_t); | |
-static int32 parse_integer(char first, BDataIO &stream, char &_last, int32 base = 10) throw (status_t); | |
+static char read_char(BDataIO &stream, bool endOfFileAllowed = false); | |
+static int32 parse_integer(char first, BDataIO &stream, char &_last, int32 base = 10); | |
using namespace RTF; | |
static char | |
-read_char(BDataIO &stream, bool endOfFileAllowed) throw (status_t) | |
+read_char(BDataIO &stream, bool endOfFileAllowed) | |
{ | |
char c; | |
ssize_t bytesRead = stream.Read(&c, 1); | |
@@ -58,7 +58,6 @@ read_char(BDataIO &stream, bool endOfFileAllowed) throw (status_t) | |
static int32 | |
parse_integer(char first, BDataIO &stream, char &_last, int32 base) | |
- throw (status_t) | |
{ | |
const char *kDigits = "0123456789abcdef"; | |
int32 integer = 0; | |
@@ -292,7 +291,7 @@ Group::~Group() | |
void | |
-Group::Parse(char first, BDataIO &stream, char &last) throw (status_t) | |
+Group::Parse(char first, BDataIO &stream, char &last) | |
{ | |
if (first == '\0') | |
first = read_char(stream); | |
@@ -452,7 +451,7 @@ Header::~Header() | |
void | |
-Header::Parse(char first, BDataIO &stream, char &last) throw (status_t) | |
+Header::Parse(char first, BDataIO &stream, char &last) | |
{ | |
// The stream has been peeked into by the parser already, and | |
// only the version follows in the stream -- let's pick it up | |
@@ -529,7 +528,7 @@ Text::IsDefinitionDelimiter() | |
void | |
-Text::Parse(char first, BDataIO &stream, char &last) throw (status_t) | |
+Text::Parse(char first, BDataIO &stream, char &last) | |
{ | |
char c = first; | |
if (c == '\0') | |
@@ -613,7 +612,7 @@ Command::~Command() | |
void | |
-Command::Parse(char first, BDataIO &stream, char &last) throw (status_t) | |
+Command::Parse(char first, BDataIO &stream, char &last) | |
{ | |
if (first == '\0') | |
first = read_char(stream); | |
@@ -817,7 +816,7 @@ Worker::Dispatch(Element *element) | |
void | |
-Worker::Work() throw (status_t) | |
+Worker::Work() | |
{ | |
Dispatch(&fStart); | |
} | |
diff --git a/src/add-ons/translators/rtf/RTF.h b/src/add-ons/translators/rtf/RTF.h | |
index 504f2295ab..91f7ff9721 100644 | |
--- a/src/add-ons/translators/rtf/RTF.h | |
+++ b/src/add-ons/translators/rtf/RTF.h | |
@@ -53,7 +53,7 @@ class Element { | |
Group *Parent() const; | |
virtual bool IsDefinitionDelimiter(); | |
- virtual void Parse(char first, BDataIO &stream, char &last) throw (status_t) = 0; | |
+ virtual void Parse(char first, BDataIO &stream, char &last) = 0; | |
virtual void PrintToStream(int32 level = 0); | |
private: | |
@@ -79,7 +79,7 @@ class Group : public Element { | |
void DetermineDestination(); | |
group_destination Destination() const; | |
- virtual void Parse(char first, BDataIO &stream, char &last) throw (status_t); | |
+ virtual void Parse(char first, BDataIO &stream, char &last); | |
protected: | |
BList fElements; | |
@@ -96,7 +96,7 @@ class Header : public Group { | |
rgb_color Color(int32 index); | |
- virtual void Parse(char first, BDataIO &stream, char &last) throw (status_t); | |
+ virtual void Parse(char first, BDataIO &stream, char &last); | |
private: | |
int32 fVersion; | |
@@ -113,7 +113,7 @@ class Text : public Element { | |
uint32 Length() const; | |
virtual bool IsDefinitionDelimiter(); | |
- virtual void Parse(char first, BDataIO &stream, char &last) throw (status_t); | |
+ virtual void Parse(char first, BDataIO &stream, char &last); | |
private: | |
BString fText; | |
@@ -132,7 +132,7 @@ class Command : public Element { | |
bool HasOption() const; | |
int32 Option() const; | |
- virtual void Parse(char first, BDataIO &stream, char &last) throw (status_t); | |
+ virtual void Parse(char first, BDataIO &stream, char &last); | |
private: | |
BString fName; | |
@@ -163,7 +163,7 @@ class Worker { | |
Worker(RTF::Header &start); | |
virtual ~Worker(); | |
- void Work() throw (status_t); | |
+ void Work(); | |
protected: | |
virtual void Group(RTF::Group *group); | |
diff --git a/src/add-ons/translators/rtf/convert.cpp b/src/add-ons/translators/rtf/convert.cpp | |
index 4924f7f435..94b8addef9 100644 | |
--- a/src/add-ons/translators/rtf/convert.cpp | |
+++ b/src/add-ons/translators/rtf/convert.cpp | |
@@ -60,7 +60,7 @@ class TextOutput : public RTF::Worker { | |
virtual void Text(RTF::Text *text); | |
private: | |
- void PrepareTextRun(text_run *current) throw (status_t); | |
+ void PrepareTextRun(text_run *current); | |
BDataIO *fTarget; | |
int32 fOffset; | |
@@ -89,7 +89,7 @@ conversion_context::Reset() | |
static size_t | |
write_text(conversion_context &context, const char *text, size_t length, | |
- BDataIO *target = NULL) throw (status_t) | |
+ BDataIO *target = NULL) | |
{ | |
size_t prefix = 0; | |
if (context.new_line) { | |
@@ -116,7 +116,7 @@ write_text(conversion_context &context, const char *text, size_t length, | |
static size_t | |
write_text(conversion_context &context, const char *text, | |
- BDataIO *target = NULL) throw (status_t) | |
+ BDataIO *target = NULL) | |
{ | |
return write_text(context, text, strlen(text), target); | |
} | |
@@ -124,7 +124,7 @@ write_text(conversion_context &context, const char *text, | |
static size_t | |
next_line(conversion_context &context, const char *prefix, | |
- BDataIO *target) throw (status_t) | |
+ BDataIO *target) | |
{ | |
size_t length = strlen(prefix); | |
context.new_line = true; | |
@@ -143,7 +143,7 @@ next_line(conversion_context &context, const char *prefix, | |
static size_t | |
write_unicode_char(conversion_context &context, uint32 c, | |
- BDataIO *target) throw (status_t) | |
+ BDataIO *target) | |
{ | |
size_t length = 1; | |
char bytes[4]; | |
@@ -173,7 +173,7 @@ write_unicode_char(conversion_context &context, uint32 c, | |
static size_t | |
process_command(conversion_context &context, RTF::Command *command, | |
- BDataIO *target) throw (status_t) | |
+ BDataIO *target) | |
{ | |
const char *name = command->Name(); | |
@@ -374,7 +374,7 @@ TextOutput::FlattenedRunArray(int32 &_size) | |
void | |
-TextOutput::PrepareTextRun(text_run *run) throw (status_t) | |
+TextOutput::PrepareTextRun(text_run *run) | |
{ | |
if (run != NULL && fOffset == run->offset) | |
return; | |
diff --git a/src/add-ons/translators/wonderbrush/support/blending.h b/src/add-ons/translators/wonderbrush/support/blending.h | |
index ffa911efdf..c5cf531db8 100644 | |
--- a/src/add-ons/translators/wonderbrush/support/blending.h | |
+++ b/src/add-ons/translators/wonderbrush/support/blending.h | |
@@ -46,7 +46,7 @@ blend_gamma(uint16 b1, uint16 b2, uint16 b3, uint8 ba, // bottom components | |
*da = 255; | |
} else { | |
uint8 alphaRest = 255 - ta; | |
- register uint32 alphaTemp = (65025 - alphaRest * (255 - ba)); | |
+ uint32 alphaTemp = (65025 - alphaRest * (255 - ba)); | |
uint32 alphaDest = ba * alphaRest; | |
uint32 alphaSrc = 255 * ta; | |
*d1 = kInverseGammaTable[(b1 * alphaDest + t1 * alphaSrc) / alphaTemp]; | |
diff --git a/src/apps/mail/WIndex.cpp b/src/apps/mail/WIndex.cpp | |
index 8f27a5e8ab..c3fcdf01ea 100644 | |
--- a/src/apps/mail/WIndex.cpp | |
+++ b/src/apps/mail/WIndex.cpp | |
@@ -479,8 +479,8 @@ gen_crc_table() | |
{ | |
// generate the table of CRC remainders for all possible bytes | |
- register int i, j; | |
- register unsigned long crc_accum; | |
+ int i, j; | |
+ unsigned long crc_accum; | |
for (i = 0; i < 256; i++) { | |
crc_accum = ((unsigned long) i << 24); | |
@@ -502,7 +502,7 @@ update_crc(unsigned long crc_accum, const char *data_blk_ptr, int data_blk_size) | |
{ | |
// update the CRC on the data block one byte at a time | |
- register int i, j; | |
+ int i, j; | |
for (j = 0; j < data_blk_size; j++) { | |
i = ((int) (crc_accum >> 24) ^ *data_blk_ptr++) & 0xff; | |
diff --git a/src/apps/terminal/Jamfile b/src/apps/terminal/Jamfile | |
index fcd89343a9..89050a585a 100644 | |
--- a/src/apps/terminal/Jamfile | |
+++ b/src/apps/terminal/Jamfile | |
@@ -1,5 +1,7 @@ | |
SubDir HAIKU_TOP src apps terminal ; | |
+AddSubDirSupportedPlatforms libbe_test ; | |
+ | |
UseHeaders [ FDirName $(HAIKU_TOP) src kits tracker ] ; | |
UsePrivateHeaders libroot kernel shared system ; | |
diff --git a/src/bin/setmime.cpp b/src/bin/setmime.cpp | |
index 113973117f..bb5619451b 100644 | |
--- a/src/bin/setmime.cpp | |
+++ b/src/bin/setmime.cpp | |
@@ -229,7 +229,7 @@ struct MimeAttribute | |
MimeAttribute& operator=(const MimeAttribute& src); | |
void Dump(); | |
- void SyncWith(TUserArgs& args) throw(Error); | |
+ void SyncWith(TUserArgs& args); | |
void StoreInto(BMessage* target); | |
const char* UserArgValue(TUserArgs& map, const char* name); | |
@@ -329,7 +329,7 @@ MimeAttribute::operator=(const MimeAttribute& src) | |
void | |
-MimeAttribute::SyncWith(TUserArgs& args) throw(Error) | |
+MimeAttribute::SyncWith(TUserArgs& args) | |
{ | |
const char* value = UserArgValue(args, kAttribute); | |
if (value != NULL) | |
@@ -481,19 +481,19 @@ MimeAttribute::UserArgValue(TUserArgs& map, const char* name) | |
class MimeType : public BMimeType { | |
public: | |
- MimeType(char** argv) throw (Error); | |
+ MimeType(char** argv); | |
~MimeType(); | |
- void Process() throw (Error); | |
+ void Process(); | |
private: | |
status_t _InitCheck(); | |
- void _SetTo(const char* mimetype) throw (Error); | |
+ void _SetTo(const char* mimetype); | |
void _PurgeProperties(); | |
- void _Init(char** argv) throw (Error); | |
+ void _Init(char** argv); | |
void _DumpIcon(uint8 *iconData, size_t iconSize); | |
- void _Dump(const char* mimetype) throw (Error); | |
- void _DoEdit() throw (Error); | |
+ void _Dump(const char* mimetype); | |
+ void _DoEdit(); | |
void _SetIcon(const char* iconData, int32 iconSize); | |
const char* _UserArgValue(const char* name); | |
@@ -533,7 +533,7 @@ private: | |
}; | |
-MimeType::MimeType(char** argv) throw (Error) | |
+MimeType::MimeType(char** argv) | |
: | |
fStatus(B_NO_INIT), | |
fToolName(argv[0]), | |
@@ -568,7 +568,7 @@ MimeType::~MimeType() | |
void | |
-MimeType::_Init(char** argv) throw (Error) | |
+MimeType::_Init(char** argv) | |
{ | |
// fill the helper map of options - for quick lookup of arguments | |
map<uint32, const CmdOption*> cmdOptionsMap; | |
@@ -799,7 +799,7 @@ MimeType::_SetIcon(const char* iconData, int32 iconSize) | |
void | |
-MimeType::_SetTo(const char* mimetype) throw (Error) | |
+MimeType::_SetTo(const char* mimetype) | |
{ | |
if (mimetype == NULL) | |
return; // iterate all types - nothing to load ATM | |
@@ -880,7 +880,7 @@ MimeType::_UserArgValue(const char* name) | |
void | |
-MimeType::_Dump(const char* mimetype) throw (Error) | |
+MimeType::_Dump(const char* mimetype) | |
{ | |
// _Dump can be called as part of all types iteration - so set to required | |
if (Type() == NULL || strcasecmp(Type(), mimetype) != 0) | |
@@ -947,7 +947,7 @@ MimeType::_Dump(const char* mimetype) throw (Error) | |
void | |
-MimeType::_DoEdit() throw (Error) | |
+MimeType::_DoEdit() | |
{ | |
if (fDoRemove || fDoForce) { | |
status_t result = Delete(); | |
@@ -1087,7 +1087,7 @@ MimeType::_DoEdit() throw (Error) | |
void | |
-MimeType::Process() throw (Error) | |
+MimeType::Process() | |
{ | |
if (fCheckSniffRule) { | |
TUserArgsI I = fUserArguments.find(fOpMode); | |
diff --git a/src/build/libroot/fs_descriptors.cpp b/src/build/libroot/fs_descriptors.cpp | |
index 1f9e1c8aa5..c40361a6e1 100644 | |
--- a/src/build/libroot/fs_descriptors.cpp | |
+++ b/src/build/libroot/fs_descriptors.cpp | |
@@ -496,6 +496,12 @@ get_descriptor(int fd) | |
int | |
add_descriptor(Descriptor *descriptor) | |
{ | |
+ if (descriptor == NULL) { | |
+ printf("[!] add_descriptor: descriptor == NULL\n"); | |
+ exit(0); | |
+ return -1; | |
+ } | |
+ | |
if (!sDescriptors) | |
sDescriptors = new DescriptorMap; | |
diff --git a/src/kits/interface/RegionSupport.cpp b/src/kits/interface/RegionSupport.cpp | |
index be2eda6e46..ca2cc5c58c 100644 | |
--- a/src/kits/interface/RegionSupport.cpp | |
+++ b/src/kits/interface/RegionSupport.cpp | |
@@ -213,7 +213,7 @@ BRegion::Support::DestroyRegion(BRegion* r) | |
void | |
BRegion::Support::miSetExtents(BRegion* pReg) | |
{ | |
- register clipping_rect* pBox; | |
+ clipping_rect* pBox; | |
clipping_rect* pBoxEnd; | |
clipping_rect* pExtents; | |
@@ -265,12 +265,12 @@ BRegion::Support::miSetExtents(BRegion* pReg) | |
*/ | |
void | |
BRegion::Support::XOffsetRegion( | |
- register BRegion* pRegion, | |
- register int x, | |
- register int y) | |
+ BRegion* pRegion, | |
+ int x, | |
+ int y) | |
{ | |
- register int nbox; | |
- register clipping_rect *pbox; | |
+ int nbox; | |
+ clipping_rect *pbox; | |
pbox = pRegion->fData; | |
nbox = pRegion->fCount; | |
@@ -319,10 +319,10 @@ BRegion::Support::XOffsetRegion( | |
static void | |
Compress( | |
BRegion* r, BRegion* s, BRegion* t, | |
- register unsigned dx, | |
- register int xdir, register int grow) | |
+ unsigned dx, | |
+ int xdir, int grow) | |
{ | |
- register unsigned shift = 1; | |
+ unsigned shift = 1; | |
ZCopyRegion(r, s); | |
while (dx) { | |
@@ -372,9 +372,9 @@ XShrinkRegion( | |
static clipping_rect* | |
IndexRects( | |
- register clipping_rect *rect, | |
- register int rectCount, | |
- register int y) | |
+ clipping_rect *rect, | |
+ int rectCount, | |
+ int y) | |
{ | |
while ((rectCount--) && (rect->bottom <= y)) | |
rect++; | |
@@ -401,17 +401,17 @@ IndexRects( | |
*/ | |
int | |
BRegion::Support::miIntersectO ( | |
- register BRegion* pReg, | |
- register clipping_rect* r1, | |
+ BRegion* pReg, | |
+ clipping_rect* r1, | |
clipping_rect* r1End, | |
- register clipping_rect* r2, | |
+ clipping_rect* r2, | |
clipping_rect* r2End, | |
int top, | |
int bottom) | |
{ | |
- register int left; | |
- register int right; | |
- register clipping_rect* pNextRect; | |
+ int left; | |
+ int right; | |
+ clipping_rect* pNextRect; | |
pNextRect = &pReg->fData[pReg->fCount]; | |
@@ -467,7 +467,7 @@ int | |
BRegion::Support::XIntersectRegion( | |
const BRegion* reg1, | |
const BRegion* reg2, /* source regions */ | |
- register BRegion* newReg) /* destination BRegion* */ | |
+ BRegion* newReg) /* destination BRegion* */ | |
{ | |
/* check for trivial reject */ | |
if ( (!(reg1->fCount)) || (!(reg2->fCount)) || | |
@@ -490,8 +490,8 @@ BRegion::Support::XIntersectRegion( | |
void | |
BRegion::Support::miRegionCopy( | |
- register BRegion* dstrgn, | |
- register const BRegion* rgn) | |
+ BRegion* dstrgn, | |
+ const BRegion* rgn) | |
{ | |
*dstrgn = *rgn; | |
@@ -507,15 +507,15 @@ BRegion::Support::miRegionCopy( | |
static void | |
combineRegs( | |
- register BRegion* newReg, | |
+ BRegion* newReg, | |
BRegion* reg1, | |
BRegion* reg2) | |
{ | |
- register BRegion* tempReg; | |
- register clipping_rect *rects_; | |
- register clipping_rect *rects1; | |
- register clipping_rect *rects2; | |
- register int total; | |
+ BRegion* tempReg; | |
+ clipping_rect *rects_; | |
+ clipping_rect *rects1; | |
+ clipping_rect *rects2; | |
+ int total; | |
rects1 = reg1->fData; | |
rects2 = reg2->fData; | |
@@ -592,13 +592,13 @@ QuickCheck(BRegion* newReg, BRegion* reg1, BRegion* reg2) | |
static int | |
TopRects( | |
- register BRegion* newReg, | |
- register clipping_rect *rects_, | |
- register BRegion* reg1, | |
- register BRegion* reg2, | |
+ BRegion* newReg, | |
+ clipping_rect *rects_, | |
+ BRegion* reg1, | |
+ BRegion* reg2, | |
clipping_rect *FirstRect) | |
{ | |
- register clipping_rect *tempRects; | |
+ clipping_rect *tempRects; | |
/* need to add some fData from region 1 */ | |
if (reg1->fBounds.top < reg2->fBounds.top) | |
@@ -652,13 +652,13 @@ TopRects( | |
*/ | |
int | |
BRegion::Support::miCoalesce( | |
- register BRegion* pReg, /* BRegion* to coalesce */ | |
+ BRegion* pReg, /* BRegion* to coalesce */ | |
int prevStart, /* Index of start of previous band */ | |
int curStart) /* Index of start of current band */ | |
{ | |
- register clipping_rect* pPrevBox; /* Current box in previous band */ | |
- register clipping_rect* pCurBox; /* Current box in current band */ | |
- register clipping_rect* pRegEnd; /* End of region */ | |
+ clipping_rect* pPrevBox; /* Current box in previous band */ | |
+ clipping_rect* pCurBox; /* Current box in current band */ | |
+ clipping_rect* pRegEnd; /* End of region */ | |
int curNumRects; /* Number of rectangles in current | |
* band */ | |
int prevNumRects; /* Number of rectangles in previous | |
@@ -802,48 +802,48 @@ BRegion::Support::miCoalesce( | |
*/ | |
void | |
BRegion::Support::miRegionOp( | |
- register BRegion* newReg, /* Place to store result */ | |
+ BRegion* newReg, /* Place to store result */ | |
const BRegion* reg1, /* First region in operation */ | |
const BRegion* reg2, /* 2d region in operation */ | |
int (*overlapFunc)( | |
- register BRegion* pReg, | |
- register clipping_rect* r1, | |
+ BRegion* pReg, | |
+ clipping_rect* r1, | |
clipping_rect* r1End, | |
- register clipping_rect* r2, | |
+ clipping_rect* r2, | |
clipping_rect* r2End, | |
int top, | |
int bottom), /* Function to call for over- | |
* lapping bands */ | |
int (*nonOverlap1Func)( | |
- register BRegion* pReg, | |
- register clipping_rect* r, | |
+ BRegion* pReg, | |
+ clipping_rect* r, | |
clipping_rect* rEnd, | |
- register int top, | |
- register int bottom), /* Function to call for non- | |
+ int top, | |
+ int bottom), /* Function to call for non- | |
* overlapping bands in region | |
* 1 */ | |
int (*nonOverlap2Func)( | |
- register BRegion* pReg, | |
- register clipping_rect* r, | |
+ BRegion* pReg, | |
+ clipping_rect* r, | |
clipping_rect* rEnd, | |
- register int top, | |
- register int bottom)) /* Function to call for non- | |
+ int top, | |
+ int bottom)) /* Function to call for non- | |
* overlapping bands in region | |
* 2 */ | |
{ | |
- register clipping_rect* r1; /* Pointer into first region */ | |
- register clipping_rect* r2; /* Pointer into 2d region */ | |
+ clipping_rect* r1; /* Pointer into first region */ | |
+ clipping_rect* r2; /* Pointer into 2d region */ | |
clipping_rect* r1End; /* End of 1st region */ | |
clipping_rect* r2End; /* End of 2d region */ | |
- register int ybot; /* Bottom of intersection */ | |
- register int ytop; /* Top of intersection */ | |
+ int ybot; /* Bottom of intersection */ | |
+ int ytop; /* Top of intersection */ | |
// clipping_rect* oldRects; /* Old fData for newReg */ | |
int prevBand; /* Index of start of | |
* previous band in newReg */ | |
int curBand; /* Index of start of current | |
* band in newReg */ | |
- register clipping_rect* r1BandEnd; /* End of current band in r1 */ | |
- register clipping_rect* r2BandEnd; /* End of current band in r2 */ | |
+ clipping_rect* r1BandEnd; /* End of current band in r1 */ | |
+ clipping_rect* r2BandEnd; /* End of current band in r2 */ | |
int top; /* Top of non-overlapping | |
* band */ | |
int bot; /* Bottom of non-overlapping | |
@@ -1104,11 +1104,11 @@ BRegion::Support::miRegionOp( | |
*----------------------------------------------------------------------- | |
*/ | |
int | |
-BRegion::Support::miUnionNonO(register BRegion* pReg, | |
- register clipping_rect* r, clipping_rect* rEnd, | |
- register int top, register int bottom) | |
+BRegion::Support::miUnionNonO(BRegion* pReg, | |
+ clipping_rect* r, clipping_rect* rEnd, | |
+ int top, int bottom) | |
{ | |
- register clipping_rect* pNextRect = &pReg->fData[pReg->fCount]; | |
+ clipping_rect* pNextRect = &pReg->fData[pReg->fCount]; | |
assert(top < bottom); | |
@@ -1147,15 +1147,15 @@ BRegion::Support::miUnionNonO(register BRegion* pReg, | |
int | |
BRegion::Support::miUnionO ( | |
- register BRegion* pReg, | |
- register clipping_rect* r1, | |
+ BRegion* pReg, | |
+ clipping_rect* r1, | |
clipping_rect* r1End, | |
- register clipping_rect* r2, | |
+ clipping_rect* r2, | |
clipping_rect* r2End, | |
- register int top, | |
- register int bottom) | |
+ int top, | |
+ int bottom) | |
{ | |
- register clipping_rect* pNextRect; | |
+ clipping_rect* pNextRect; | |
pNextRect = &pReg->fData[pReg->fCount]; | |
@@ -1299,13 +1299,13 @@ BRegion::Support::XUnionRegion( | |
*/ | |
int | |
BRegion::Support::miSubtractNonO1 ( | |
- register BRegion* pReg, | |
- register clipping_rect* r, | |
+ BRegion* pReg, | |
+ clipping_rect* r, | |
clipping_rect* rEnd, | |
- register int top, | |
- register int bottom) | |
+ int top, | |
+ int bottom) | |
{ | |
- register clipping_rect* pNextRect; | |
+ clipping_rect* pNextRect; | |
pNextRect = &pReg->fData[pReg->fCount]; | |
@@ -1345,16 +1345,16 @@ BRegion::Support::miSubtractNonO1 ( | |
*/ | |
int | |
BRegion::Support::miSubtractO( | |
- register BRegion* pReg, | |
- register clipping_rect* r1, | |
+ BRegion* pReg, | |
+ clipping_rect* r1, | |
clipping_rect* r1End, | |
- register clipping_rect* r2, | |
+ clipping_rect* r2, | |
clipping_rect* r2End, | |
- register int top, | |
- register int bottom) | |
+ int top, | |
+ int bottom) | |
{ | |
- register clipping_rect* pNextRect; | |
- register int left; | |
+ clipping_rect* pNextRect; | |
+ int left; | |
left = r1->left; | |
@@ -1496,7 +1496,7 @@ int | |
BRegion::Support::XSubtractRegion( | |
const BRegion* regM, | |
const BRegion* regS, | |
- register BRegion* regD) | |
+ BRegion* regD) | |
{ | |
/* check for trivial reject */ | |
if ( (!(regM->fCount)) || (!(regS->fCount)) || | |
@@ -1564,12 +1564,12 @@ BRegion::Support::XPointInRegion( | |
int | |
BRegion::Support::XRectInRegion( | |
- register const BRegion* region, | |
+ const BRegion* region, | |
const clipping_rect& rect) | |
{ | |
- register clipping_rect* pbox; | |
- register clipping_rect* pboxEnd; | |
- register const clipping_rect* prect = ▭ | |
+ clipping_rect* pbox; | |
+ clipping_rect* pboxEnd; | |
+ const clipping_rect* prect = ▭ | |
bool partIn, partOut; | |
int rx = prect->left; | |
diff --git a/src/kits/media/experimental/MediaClient.cpp b/src/kits/media/experimental/MediaClient.cpp | |
old mode 100755 | |
new mode 100644 | |
diff --git a/src/preferences/mail/DNSQuery.cpp b/src/preferences/mail/DNSQuery.cpp | |
index 0f76be0dce..c313d8c995 100644 | |
--- a/src/preferences/mail/DNSQuery.cpp | |
+++ b/src/preferences/mail/DNSQuery.cpp | |
@@ -170,7 +170,7 @@ DNSTools::GetDNSServers(BObjectList<BString>* serverList) | |
path.Append("network/resolv.conf"); | |
- register FILE* fp = fopen(path.Path(), "r"); | |
+ FILE* fp = fopen(path.Path(), "r"); | |
if (fp == NULL) { | |
fprintf(stderr, "failed to open '%s' to read nameservers: %s\n", | |
path.Path(), strerror(errno)); | |
@@ -179,8 +179,8 @@ DNSTools::GetDNSServers(BObjectList<BString>* serverList) | |
int nserv = 0; | |
char buf[1024]; | |
- register char *cp; //, **pp; | |
-// register int n; | |
+ char *cp; //, **pp; | |
+// int n; | |
int MAXNS = 2; | |
// read the config file | |
diff --git a/src/preferences/time/ZoneView.cpp b/src/preferences/time/ZoneView.cpp | |
index bd6e81227a..64afaf394f 100644 | |
--- a/src/preferences/time/ZoneView.cpp | |
+++ b/src/preferences/time/ZoneView.cpp | |
@@ -262,6 +262,8 @@ TimeZoneView::_InitView() | |
void | |
TimeZoneView::_BuildZoneMenu() | |
{ | |
+ abort(); | |
+#if 0 | |
BTimeZone defaultTimeZone; | |
BLocaleRoster::Default()->GetDefaultTimeZone(&defaultTimeZone); | |
@@ -457,6 +459,7 @@ TimeZoneView::_BuildZoneMenu() | |
} else | |
lastWasCountryItem = false; | |
} | |
+#endif | |
} | |
diff --git a/src/servers/app/drawing/Painter/bitmap_painter/DrawBitmapBilinear.h b/src/servers/app/drawing/Painter/bitmap_painter/DrawBitmapBilinear.h | |
index 7dd3e59267..b5ee4ca43c 100644 | |
--- a/src/servers/app/drawing/Painter/bitmap_painter/DrawBitmapBilinear.h | |
+++ b/src/servers/app/drawing/Painter/bitmap_painter/DrawBitmapBilinear.h | |
@@ -250,12 +250,12 @@ struct BilinearDefault : | |
const uint16 wBottom = 255 - this->fWeightsY[y1].weight; | |
// buffer offset into source (top row) | |
- register const uint8* src = this->fSource->row_ptr( | |
+ const uint8* src = this->fSource->row_ptr( | |
this->fWeightsY[y1].index); | |
// buffer handle for destination to be incremented per | |
// pixel | |
- register uint8* d = this->fDestination; | |
+ uint8* d = this->fDestination; | |
for (int32 x = xIndexL; x <= xIndexMax; x++) { | |
const uint8* s = src + this->fWeightsX[x].index; | |
@@ -291,10 +291,10 @@ struct BilinearDefault : | |
// last row of pixels if necessary | |
// buffer offset into source (bottom row) | |
- register const uint8* src | |
+ const uint8* src | |
= this->fSource->row_ptr(this->fWeightsY[y2].index); | |
// buffer handle for destination to be incremented per pixel | |
- register uint8* d = this->fDestination; | |
+ uint8* d = this->fDestination; | |
if (yMax < y2) { | |
for (int32 x = xIndexL; x <= xIndexMax; x++) { | |
@@ -332,10 +332,10 @@ struct BilinearLowFilterRatio : | |
const uint16 wBottom = 255 - fWeightsY[y1].weight; | |
// buffer offset into source (top row) | |
- register const uint8* src = fSource->row_ptr(fWeightsY[y1].index); | |
+ const uint8* src = fSource->row_ptr(fWeightsY[y1].index); | |
// buffer handle for destination to be incremented per | |
// pixel | |
- register uint8* d = fDestination; | |
+ uint8* d = fDestination; | |
if (wTop == 255) { | |
for (int32 x = xIndexL; x <= xIndexR; x++) { | |
@@ -451,9 +451,9 @@ struct BilinearSimd : DrawBitmapBilinearOptimized<BilinearSimd> { | |
// last row of pixels if necessary | |
// buffer offset into source (bottom row) | |
- register const uint8* src = fSource->row_ptr(fWeightsY[y2].index); | |
+ const uint8* src = fSource->row_ptr(fWeightsY[y2].index); | |
// buffer handle for destination to be incremented per pixel | |
- register uint8* d = fDestination; | |
+ uint8* d = fDestination; | |
if (yMax < y2) { | |
for (int32 x = xIndexL; x <= xIndexMax; x++) { | |
diff --git a/src/servers/app/drawing/Painter/bitmap_painter/DrawBitmapNearestNeighbor.h b/src/servers/app/drawing/Painter/bitmap_painter/DrawBitmapNearestNeighbor.h | |
index 59fc68b097..b25ff76ac9 100644 | |
--- a/src/servers/app/drawing/Painter/bitmap_painter/DrawBitmapNearestNeighbor.h | |
+++ b/src/servers/app/drawing/Painter/bitmap_painter/DrawBitmapNearestNeighbor.h | |
@@ -121,9 +121,9 @@ struct DrawBitmapNearestNeighborCopy { | |
for (; y1 <= y2; y1++) { | |
// buffer offset into source (top row) | |
- register const uint8* src = bitmap.row_ptr(yIndices[y1]); | |
+ const uint8* src = bitmap.row_ptr(yIndices[y1]); | |
// buffer handle for destination to be incremented per pixel | |
- register uint32* d = (uint32*)dst; | |
+ uint32* d = (uint32*)dst; | |
for (int32 x = xIndexL; x <= xIndexR; x++) { | |
*d = *(uint32*)(src + xIndices[x]); | |
diff --git a/src/system/kernel/slab/allocator.cpp b/src/system/kernel/slab/allocator.cpp | |
index 97460b3ce1..f151b3c5eb 100644 | |
--- a/src/system/kernel/slab/allocator.cpp | |
+++ b/src/system/kernel/slab/allocator.cpp | |
@@ -283,6 +283,16 @@ realloc(void* address, size_t newSize) | |
} | |
+extern "C" void * | |
+aligned_alloc(size_t alignment, size_t size) | |
+{ | |
+ if (size % alignment != 0) { | |
+ return NULL; | |
+ } | |
+ return memalign(alignment, size); | |
+} | |
+ | |
+ | |
#endif // USE_SLAB_ALLOCATOR_FOR_MALLOC | |
diff --git a/src/tests/kits/interface/picture/Jamfile b/src/tests/kits/interface/picture/Jamfile | |
index ac938489a7..2c54eab0bc 100644 | |
--- a/src/tests/kits/interface/picture/Jamfile | |
+++ b/src/tests/kits/interface/picture/Jamfile | |
@@ -1,6 +1,6 @@ | |
SubDir HAIKU_TOP src tests kits interface picture ; | |
-AddSubDirSupportedPlatforms libbe_test ; | |
+#AddSubDirSupportedPlatforms libbe_test ; | |
# libicon.a source directories | |
local iconSourceDirs = | |
-- | |
2.30.2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment