Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
66253b54
Commit
66253b54
authored
11 years ago
by
sponcec3
Committed by
Steven Murray
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed compilation in -O2 mode.
This in particular includes fixing the remaining strict-aliasing issues.
parent
ef4b216b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
mediachanger/castorrmc/common/Cregexp.c
+1
-1
1 addition, 1 deletion
mediachanger/castorrmc/common/Cregexp.c
mediachanger/castorrmc/h/marshall.h
+17
-19
17 additions, 19 deletions
mediachanger/castorrmc/h/marshall.h
mediachanger/castorrmc/h/osdep.h
+0
-5
0 additions, 5 deletions
mediachanger/castorrmc/h/osdep.h
with
18 additions
and
25 deletions
mediachanger/castorrmc/common/Cregexp.c
+
1
−
1
View file @
66253b54
...
...
@@ -486,7 +486,7 @@ char *_Cregexp_reg(int paren, /* Parenthesized? */
char
*
ret
;
char
*
br
;
char
*
ender
;
int
parno
;
int
parno
=
0
;
int
flags
;
*
flagp
=
HASWIDTH
;
/* Tentatively. */
...
...
This diff is collapsed.
Click to expand it.
mediachanger/castorrmc/h/marshall.h
+
17
−
19
View file @
66253b54
...
...
@@ -22,7 +22,6 @@
#define SHORT WORD
/* #define U_SHORT U_WORD */
#define SHORTSIZE WORDSIZE
#define SHORTADDR WORDADDR
#define marshall_WORD marshall_SHORT
#define unmarshall_WORD unmarshall_SHORT
...
...
@@ -76,14 +75,14 @@ typedef char* bitvct; /* bit vector type definition */
*/
#define marshall_BYTE(ptr,n) { BYTE n_ = n; \
(void) memcpy((ptr),
BYTEADDR(n_),BYTESIZE
); \
INC_PTR(ptr,
BYTESIZE
); \
(void) memcpy((ptr),
&n_,1
); \
INC_PTR(ptr,
1
); \
}
#define unmarshall_BYTE(ptr,n) { BYTE n_ = 0; \
(void) memcpy(
BYTEADDR(
n_
)
,(ptr),
BYTESIZE
); \
(void) memcpy(
&
n_,(ptr),
1
); \
n = n_; \
INC_PTR(ptr,
BYTESIZE
); \
INC_PTR(ptr,
1
); \
}
/*
...
...
@@ -91,12 +90,12 @@ typedef char* bitvct; /* bit vector type definition */
*/
#define marshall_SHORT(ptr,n) { SHORT n_ = htons((unsigned short)(n)); \
(void) memcpy((ptr),
SHORTADDR(
n_
)
,SHORTSIZE); \
(void) memcpy((ptr),
&
n_,SHORTSIZE); \
INC_PTR(ptr,SHORTSIZE); \
}
#define unmarshall_SHORT(ptr,n) { SHORT n_ = 0; \
(void) memcpy(
SHORTADDR(
n_
)
,(ptr),SHORTSIZE); \
(void) memcpy(
&
n_,(ptr),SHORTSIZE); \
n = ntohs((unsigned short)(n_)); \
if ( BIT_ISSET(ptr,0) && sizeof(SHORT)-SHORTSIZE > 0 ) \
(void) memset((char *)&n,255,sizeof(SHORT)-SHORTSIZE); \
...
...
@@ -108,12 +107,12 @@ typedef char* bitvct; /* bit vector type definition */
*/
#define marshall_LONG(ptr,n) { LONG n_ = htonl((unsigned long)(n)); \
(void) memcpy((ptr),
LONGADDR(
n_
)
,LONGSIZE); \
(void) memcpy((ptr),
&
n_,LONGSIZE); \
INC_PTR(ptr,LONGSIZE); \
}
#define unmarshall_LONG(ptr,n) { LONG n_ = 0; \
(void) memcpy(
LONGADDR(
n_
)
,(ptr),LONGSIZE); \
(void) memcpy(
&
n_,(ptr),LONGSIZE); \
n = ntohl((unsigned long)(n_)); \
if ( BIT_ISSET(ptr,0) && sizeof(LONG)-LONGSIZE > 0 ) \
(void) memset((char *)&n,255,sizeof(LONG)-LONGSIZE); \
...
...
@@ -148,23 +147,22 @@ EXTERN_C int _unmarshall_STRINGN (char **, char*, int);
*/
#define marshall_HYPER(ptr,n) { U_HYPER u_ = n; \
LONG n_ = htonl(
*(
(U_LONG
*)((char *)&(u_)+LONGSIZE))
); \
(void) memcpy((ptr),
LONGADDR(
n_
)
,LONGSIZE); \
U_
LONG n_ = htonl((U_LONG
)u_
); \
(void) memcpy((ptr),
&
n_,LONGSIZE); \
INC_PTR(ptr,LONGSIZE); \
n_ = htonl(
*(
(U_LONG
*)&(u_)
)); \
(void) memcpy((ptr),
LONGADDR(
n_
)
,LONGSIZE); \
n_ = htonl((U_LONG
)(u_ >> 32
)); \
(void) memcpy((ptr),
&
n_,LONGSIZE); \
INC_PTR(ptr,LONGSIZE); \
}
#define unmarshall_HYPER(ptr,n) { U_HYPER u_ = 0; \
LONG n_ = 0; \
(void) memcpy(LONGADDR(n_),(ptr),LONGSIZE); \
*((LONG *)((char *)&(u_)+LONGSIZE)) = \
ntohl((U_LONG)(n_)); \
U_LONG n_ = 0; \
(void) memcpy(&n_,(ptr),LONGSIZE); \
u_ = ntohl(n_); \
INC_PTR(ptr,LONGSIZE); \
n_ = 0; \
(void) memcpy(
LONGADDR(
n_
)
,(ptr),LONGSIZE); \
*((LONG *)&(u_)) = ntohl((U_LONG)(n_)
); \
(void) memcpy(
&
n_,(ptr),LONGSIZE); \
u_ |= (((U_HYPER)ntohl(n_)) << 32
); \
INC_PTR(ptr,LONGSIZE); \
n = u_; \
}
...
...
This diff is collapsed.
Click to expand it.
mediachanger/castorrmc/h/osdep.h
+
0
−
5
View file @
66253b54
...
...
@@ -19,7 +19,6 @@
* Data representation
*/
#define BYTESIZE 1
#define WORDSIZE 2
#define LONGSIZE 4
#define QUADSIZE 8
...
...
@@ -33,10 +32,6 @@ typedef char BYTE;
typedef
short
WORD
;
typedef
int
LONG
;
#define BYTEADDR(x) (((char *)&(x))+sizeof(BYTE)-BYTESIZE)
#define WORDADDR(x) (((char *)&(x))+sizeof(WORD)-WORDSIZE)
#define LONGADDR(x) (((char *)&(x))+sizeof(LONG)-LONGSIZE)
typedef
long
long
signed64
;
typedef
unsigned
long
long
u_signed64
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment