<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">I'm not sure that's possible. Whether I change them to uint8_t or int8_t, I get warnings because they get used with strncpy which wants char. Any idea how to solve this?<br>
<br>
Marc-André<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF924636"><font size="2" color="#000000" face="Tahoma"><b>From:</b> thundersim@gmail.com [thundersim@gmail.com] on behalf of Simon Marchi [simon.marchi@polymtl.ca]<br>
<b>Sent:</b> Friday, 17 January 2014 9:31 PM<br>
<b>To:</b> Marc-André Laperle<br>
<b>Cc:</b> lttng-dev@lists.lttng.org<br>
<b>Subject:</b> Re: [lttng-dev] [PATCH] Use uint32_t for lttng_viewer_stream.metadata_flag<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">While you are at it, you could change the char fields as well, since char is not exact-width either.</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On 17 January 2014 18:47, Marc-Andre Laperle <span dir="ltr">
<<a href="mailto:marc-andre.laperle@ericsson.com" target="_blank">marc-andre.laperle@ericsson.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
This struct is meant to be sent over the network so members should be<br>
of exact-width.<br>
<br>
Signed-off-by: Marc-Andre Laperle <<a href="mailto:marc-andre.laperle@ericsson.com" target="_blank">marc-andre.laperle@ericsson.com</a>><br>
---<br>
 src/bin/lttng-relayd/lttng-viewer.h | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/src/bin/lttng-relayd/lttng-viewer.h b/src/bin/lttng-relayd/lttng-viewer.h<br>
index 1977a43..6330270 100644<br>
--- a/src/bin/lttng-relayd/lttng-viewer.h<br>
+++ b/src/bin/lttng-relayd/lttng-viewer.h<br>
@@ -100,7 +100,7 @@ struct lttng_viewer_session {<br>
 struct lttng_viewer_stream {<br>
        uint64_t id;<br>
        uint64_t ctf_trace_id;<br>
-       int metadata_flag;<br>
+       uint32_t metadata_flag;<br>
        char path_name[LTTNG_VIEWER_PATH_MAX];<br>
        char channel_name[LTTNG_VIEWER_NAME_MAX];<br>
 } __attribute__((__packed__));<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.3.2<br>
<br>
<br>
_______________________________________________<br>
lttng-dev mailing list<br>
<a href="mailto:lttng-dev@lists.lttng.org" target="_blank">lttng-dev@lists.lttng.org</a><br>
<a href="http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev" target="_blank">http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a><br>
</font></span></blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</body>
</html>